Any advise on this?<div><br></div><div>Kornel<br><br><div class="gmail_quote">On Mon, Jun 13, 2011 at 2:52 AM, Kornél Schadl <span dir="ltr">&lt;<a href="mailto:neil@krnl.hu">neil@krnl.hu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I&#39;ve had to following problem:<br>
<br>
I&#39;m using svn/git for web based projects, and all projects contain an<br>
nginx.conf with specific configurations for the virtualhosts it<br>
contains. After updating code on the production server, all projects<br>
are located in different directories:<br>
project1 is in /var/www/project1, project2 is in /var/www/project2, etc.<br>
<br>
In the main nginx configuration file (let&#39;s say<br>
/usr/local/nginx/conf/nginx.conf) I include /var/www/*/nginx.conf. In<br>
the virtualhosts&#39; configuration file I specify document roots:<br>
project1&#39;s conf file has a line &quot;root /var/www/project1/web;&quot;,<br>
project2&#39;s has a line &quot;root /var/www/project2/web;&quot;.<br>
<br>
On the development machine I work with, projects are on different<br>
locations (/home/krnl/projects/project1, /home/krnl/projects/project2,<br>
etc). Because of the root directive I have to share different copies<br>
of the projects&#39; nginx.conf file on the production server and a<br>
different copy on my development host).<br>
<br>
I created a patch, where if the root directive of a virtualhost starts<br>
with &#39;.&#39; it finds the full path of the document root relative to the<br>
configuration file&#39;s location (and not relative to the main<br>
configuration file&#39;s location), so I can have the same version of<br>
projects&#39; nginx.conf on both hosts: &quot;root ./web&quot;;<br>
<br>
Until this I had: &quot;root /var/www/project1/web;&quot; on production server<br>
and &quot;root /home/krnl/projects/project1/web;&quot; on development host. Now<br>
I have &quot;root ./web;&quot; on both.<br>
<br>
I tested it on linux and osx. Can I contribute the patch? If so, how<br>
should I do this?<br>
<br>
Thanks,<br>
Kornel<br>
</blockquote></div><br></div>