My usecase is as follows<br><br>We have production, staging and several dev environments configured on different machines and we add development environments on a semi regular basis.<br><br>At the moment I have to create individual nginx conf files for each environment. Which is not hard but can be time consuming even the slightest edit on one of the files means I have to go though <br>
every config on every server and make the changes. Again not difficult but time consuming.<br><br>What I would Ideally like is one file. A bash file that I can commit to my code base. <br>This file can than figure out directory names and any specific config settings that are needed for the specific environment. <br>
For instance we set the following to be different depending on the environment type.<br><br> fastcgi_param SITE_CONFIG dev;<br><br>If I could generate this all on the fly from a bash script I would only ever need to do<br>
<br>include_shell /var/www/<a href="http://site.com/site-nginx.conf">site.com/site-nginx.conf</a><br><br>There would be no other setup for nginx. The bash script would handle everything else any changes made to the script would just require a "svn up" followed by a reload.<br>
<br>Hope that makes sense.<br><br>Alistair<br><br><br><div class="gmail_quote">On 21 August 2011 23:37, Piotr Karbowski <span dir="ltr"><<a href="mailto:jabberuser@gmail.com">jabberuser@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5">On 21.08.2011 21:16, Alistair Prestidge wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi<br>
<br>
I am pretty new to nginx I have been searching around to find if there is<br>
a similar option like include_shell that lighttpd has<br>
to use shell scripts to auto generate conf files.<br>
<br>
It appears that there is no such option, I have searched the mailing lists<br>
and documentation. Is there a reason this has not been<br>
implemented? are there any feature plans to implement this?<br>
</blockquote>
<br></div></div>
If you really need such feature I bet you can cover it with small shell script along with a function to re-generate config before you start or reload nginx.<br>
<br>
I am curious about your usecase, where you may need such thing?<br><font color="#888888">
<br>
-- Piotr.</font><div><div></div><div class="h5"><br>
<br>
______________________________<u></u>_________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/<u></u>mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><b><div><b>Thanks</b></div><div><b><br></b></div>Alistair Prestidge</b><br><br><div>
<img src="http://email-signatures.s3.amazonaws.com/EmailSignature_EMEA.gif"><b><br></b></div><br>