<html><body bgcolor="#FFFFFF"><div>I have a php command line script that builds separate conf files in one of my servers and does simple string replacement.</div><div><br></div><div>Also remember you can use includes so you can leave the main nginx.conf alone and have it include stuff from another directory you write out..</div><div><br></div><div><br>On May 3, 2010, at 6:24 AM, Luca De Marinis &lt;<a href="mailto:loop@interact.it">loop@interact.it</a>&gt; wrote:<br><br></div><div></div><blockquote type="cite"><div><div class="gmail_quote">On Mon, May 3, 2010 at 3:07 PM, Ziyad Saeed <span dir="ltr">&lt;<a href="mailto:myschizobuddy@gmail.com"><a href="mailto:myschizobuddy@gmail.com">myschizobuddy@gmail.com</a></a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
So I store the configuration in a database or xml file or whatever, and then generate the conf file from it.<div>thank you.</div></blockquote><div><br></div><div>Also, using a templating system with a scripting language (say, erb + ruby or whatever you're comfortable with) or the good old m4 may be viable, and probably simpler to use and implement. This is very easy and very convenient if you have to generate lots of different configurations (say, for n virtual hosts, or n virtual hosts on n servers) but which all share a limited number of prototype configurations.</div>
<div><br></div><div>Bye</div><div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div><div></div><div class="h5"><br><br><div class="gmail_quote">On Mon, May 3, 2010 at 3:14 AM, Gabriel Evans <span dir="ltr">&lt;<a href="mailto:me@gabevans.com" target="_blank"><a href="mailto:me@gabevans.com">me@gabevans.com</a></a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><font size="2"><font face="verdana,sans-serif">There's no API that I know of, unless you want to make your own module. You could try having a separate directory for virtual hosts included and use a database to store and generate the configuration. It'd be a lot easier</font></font> than trying to interpret the configuration as well.<br>



<br><div class="gmail_quote"><div>On Sun, May 2, 2010 at 4:21 AM, Ziyad Saeed <span dir="ltr">&lt;<a href="mailto:myschizobuddy@gmail.com" target="_blank"><a href="mailto:myschizobuddy@gmail.com">myschizobuddy@gmail.com</a></a>&gt;</span> wrote:<br></div>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><div>

<br><div>Inorder to make a simple UI for editing nginx.conf. I need a way to edit nginx.conf without having to open it up in a text editor. Does nginx have an api that i can use to edit information that is inside nginx.conf. This will help newbies add virtual host information and edit parameters via a UI.</div>




</div></blockquote></div></blockquote></div></div></div></div></blockquote></div><br><div><br></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>nginx mailing list</span><br><span><a href="mailto:nginx@nginx.org">nginx@nginx.org</a></span><br><span><a href="http://nginx.org/mailman/listinfo/nginx">http://nginx.org/mailman/listinfo/nginx</a></span><br></div></blockquote></body></html>