agree that hierarchy in inf will be ugly.<br>you have to be a guru in regular expressions to create a UI for the current nginx configuration format. with xml, json yaml etc their are plenty of libraries that can read and right them easily.<div>
Or Nginx can provide an api that i can use to read and write nginx.conf files. that&#39;s for Igor to decide.</div><div><br><div><br></div><div><br><div class="gmail_quote">On Tue, May 4, 2010 at 9:57 PM, Michael Shadle <span dir="ltr">&lt;<a href="mailto:mike503@gmail.com">mike503@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">the syntax right now is great. very structured and simple. (my only<br>
complaint is how location blocks work, partly is syntax and partly is<br>
just how it works) otherwise i think it is great.<br>
<br>
anything can be scripted and anything can have a UI thrown onto it.<br>
<br>
i don&#39;t see how inf or xml or anything would make it any easier to<br>
have to make a UI for different location blocks, rewrite rules, other<br>
complex, and other freeform, non-cookie-cutter kind of configuration<br>
items.<br>
<br>
besides, infs are one-dimensional, creating a hierarchy on that would<br>
be ugly and hard to read.<br>
<div><div></div><div class="h5"><br>
On Tue, May 4, 2010 at 3:48 AM, Ziyad Saeed &lt;<a href="mailto:myschizobuddy@gmail.com">myschizobuddy@gmail.com</a>&gt; wrote:<br>
&gt; nginx.conf file in inf format or any other template based format would have<br>
&gt; been the easiest thing to do. perhaps future version of nginx can go down<br>
&gt; this route.<br>
&gt;<br>
&gt; On Mon, May 3, 2010 at 9:12 PM, Michael Shadle &lt;<a href="mailto:mike503@gmail.com">mike503@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; I have a php command line script that builds separate conf files in one of<br>
&gt;&gt; my servers and does simple string replacement.<br>
&gt;&gt; Also remember you can use includes so you can leave the main nginx.conf<br>
&gt;&gt; alone and have it include stuff from another directory you write out..<br>
&gt;&gt;<br>
&gt;&gt; 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>
&gt;&gt;<br>
&gt;&gt; On Mon, May 3, 2010 at 3:07 PM, Ziyad Saeed &lt;<a href="mailto:myschizobuddy@gmail.com">myschizobuddy@gmail.com</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; So I store the configuration in a database or xml file or whatever, and<br>
&gt;&gt;&gt; then generate the conf file from it.<br>
&gt;&gt;&gt; thank you.<br>
&gt;&gt;<br>
&gt;&gt; Also, using a templating system with a scripting language (say, erb + ruby<br>
&gt;&gt; or whatever you&#39;re comfortable with) or the good old m4 may be viable, and<br>
&gt;&gt; probably simpler to use and implement. This is very easy and very convenient<br>
&gt;&gt; if you have to generate lots of different configurations (say, for n virtual<br>
&gt;&gt; hosts, or n virtual hosts on n servers) but which all share a limited number<br>
&gt;&gt; of prototype configurations.<br>
&gt;&gt; Bye<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Mon, May 3, 2010 at 3:14 AM, Gabriel Evans &lt;<a href="mailto:me@gabevans.com">me@gabevans.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; There&#39;s no API that I know of, unless you want to make your own module.<br>
&gt;&gt;&gt;&gt; You could try having a separate directory for virtual hosts included and use<br>
&gt;&gt;&gt;&gt; a database to store and generate the configuration. It&#39;d be a lot easier<br>
&gt;&gt;&gt;&gt; than trying to interpret the configuration as well.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; On Sun, May 2, 2010 at 4:21 AM, Ziyad Saeed &lt;<a href="mailto:myschizobuddy@gmail.com">myschizobuddy@gmail.com</a>&gt;<br>
&gt;&gt;&gt;&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Inorder to make a simple UI for editing nginx.conf. I need a way to<br>
&gt;&gt;&gt;&gt;&gt; edit nginx.conf without having to open it up in a text editor. Does nginx<br>
&gt;&gt;&gt;&gt;&gt; have an api that i can use to edit information that is inside nginx.conf.<br>
&gt;&gt;&gt;&gt;&gt; This will help newbies add virtual host information and edit parameters via<br>
&gt;&gt;&gt;&gt;&gt; a UI.<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; nginx mailing list<br>
&gt;&gt; <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
&gt;&gt; <a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; nginx mailing list<br>
&gt;&gt; <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
&gt;&gt; <a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; nginx mailing list<br>
&gt; <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
&gt; <a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
&gt;<br>
&gt;<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br></div></div>