<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title></title>
<META http-equiv=Content-Type content="text/html; charset=windows-1251">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
body {
  margin: 5px 5px 5px 5px;
  background-color: #ffffff;
}
/* ---------- Text Styles ---------- */
hr { color: #000000}
body, table /* Normal text */
{
 font-size: 9pt;
 font-family: 'Courier New';
 font-style: normal;
 font-weight: normal;
 color: #000000;
 text-decoration: none;
}
span.rvts1 /* Heading */
{
 font-size: 10pt;
 font-family: 'Arial';
 font-weight: bold;
 color: #0000ff;
}
span.rvts2 /* Subheading */
{
 font-size: 10pt;
 font-family: 'Arial';
 font-weight: bold;
 color: #000080;
}
span.rvts3 /* Keywords */
{
 font-size: 10pt;
 font-family: 'Arial';
 font-style: italic;
 color: #800000;
}
a.rvts4, span.rvts4 /* Jump 1 */
{
 font-size: 10pt;
 font-family: 'Arial';
 color: #008000;
 text-decoration: underline;
}
a.rvts5, span.rvts5 /* Jump 2 */
{
 font-size: 10pt;
 font-family: 'Arial';
 color: #008000;
 text-decoration: underline;
}
span.rvts6
{
 font-size: 8pt;
 font-family: 'arial';
 font-style: italic;
 color: #c0c0c0;
}
a.rvts7, span.rvts7
{
 font-size: 8pt;
 font-family: 'arial';
 color: #0000ff;
 text-decoration: underline;
}
/* ---------- Para Styles ---------- */
p,ul,ol /* Paragraph Style */
{
 text-align: left;
 text-indent: 0px;
 padding: 0px 0px 0px 0px;
 margin: 0px 0px 0px 0px;
}
.rvps1 /* Centered */
{
 text-align: center;
}
--></style>
</head>
<body>

<p>Есть в конфиге такие строчки</p>
<p><br></p>
<p>server_name &nbsp;kola.knutov.net www.kola.knutov.net;</p>
<p>access_log &nbsp;/var/log/nginx/kola.knutov.net.access.log &nbsp;main;</p>
<p>error_log &nbsp;/var/log/nginx/kola.knutov.net.error.log &nbsp;error;</p>
<p>location / {</p>
<p> &nbsp; &nbsp; &nbsp; &nbsp;root &nbsp; /home/user1/kola.knutov.net/html; &nbsp; &nbsp; &nbsp; &nbsp;</p>
<p>...</p>
<p><br></p>
<p>и аналогичных строчек много. Можно ли сделать так:</p>
<p><br></p>
<p>set $root "kola.knutov.net"; &nbsp;# !!!</p>
<p><br></p>
<p>server_name &nbsp;$root www.$root ;</p>
<p>access_log &nbsp;/var/log/nginx/$root.access.log &nbsp;main;</p>
<p>error_log &nbsp;/var/log/nginx/$root.error.log &nbsp;error;</p>
<p>location / {</p>
<p> &nbsp; &nbsp; &nbsp; &nbsp;root &nbsp; /home/user1/$root/html; &nbsp; &nbsp; &nbsp; &nbsp;</p>
<p><br></p>
<p>и делать так для каждого домена ? (т.е. все строчки будут одинаковые но у каждого домена свой set $root) &nbsp;</p>
<p><br></p>
<p>Просто так оно вроде работает</p>
<p>&nbsp;/usr/local/nginx/nginx -c /etc/nginx2.conf -t</p>
<p>2007/01/10 13:55:12 [info] 1512#0: the configuration file /etc/nginx2.conf syntax is ok</p>
<p>2007/01/10 13:55:12 [info] 1512#0: the configuration file /etc/nginx2.conf was tested successfully</p>
<p><br></p>
<p>вот только&nbsp;</p>
<p># cd /var/log/nginx</p>
<p># ll</p>
<p>total 0</p>
<p>-rw-r--r-- &nbsp;1 root root 0 Jan 10 13:55 $root.access.log</p>
<p>-rw-r--r-- &nbsp;1 root root 0 Jan 10 13:55 $root.error.log</p>
<p><br></p>
<p>а это немного не то, чего хотелось :)</p>
<p><br></p>
<p><span class=rvts6>--&nbsp;</span></p>
<p><span class=rvts6>Best regards,</span></p>
<p><span class=rvts6>&nbsp;Nick &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><a class=rvts7 href="mailto:mail@knutov.com">mailto:mail@knutov.com</a></p>

</body></html>