Hey,<br><br>So is there any reason why some configuration directives can&#39;t use certain variables?<br><br>Like:<br><br><span style="font-family: courier new,monospace;">alias $document_root/my/stuff;</span><br><br>Will trigger &quot;the $document_root variable may not be used in the &quot;alias&quot; directive&quot; error.<br>
<br>However, the following trick:<br><br><span style="font-family: courier new,monospace;">set $root $document_root;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">alias $root/my/stuff;</span><br>
<br>.. will simply remove this restriction.<br><br>And another note (not sure if it is related) but:<br><br><span style="font-family: courier new,monospace;">root /my/root;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">access_log $document_root/logs/;</span><br><br>will expand into &quot;/path/to/nginx/my/root/logs&quot;<br><br>That is, it will prefix nginx install path when used in this way (might be a bug?). And <span style="font-family: courier new,monospace;">error_log</span> directive seems to not allow variables at all.<br>
<br>I find this behavior very limiting that usually requires a lot of path duplications in config file. So the question is, is there any reason why variable expansion can&#39;t be unified and be the same for all directives?<br>
<br>Simas<br>