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'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"><<a href="mailto:mike503@gmail.com">mike503@gmail.com</a>></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'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 <<a href="mailto:myschizobuddy@gmail.com">myschizobuddy@gmail.com</a>> wrote:<br>
> nginx.conf file in inf format or any other template based format would have<br>
> been the easiest thing to do. perhaps future version of nginx can go down<br>
> this route.<br>
><br>
> On Mon, May 3, 2010 at 9:12 PM, Michael Shadle <<a href="mailto:mike503@gmail.com">mike503@gmail.com</a>> wrote:<br>
>><br>
>> I have a php command line script that builds separate conf files in one of<br>
>> my servers and does simple string replacement.<br>
>> Also remember you can use includes so you can leave the main nginx.conf<br>
>> alone and have it include stuff from another directory you write out..<br>
>><br>
>> On May 3, 2010, at 6:24 AM, Luca De Marinis <<a href="mailto:loop@interact.it">loop@interact.it</a>> wrote:<br>
>><br>
>> On Mon, May 3, 2010 at 3:07 PM, Ziyad Saeed <<a href="mailto:myschizobuddy@gmail.com">myschizobuddy@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>> So I store the configuration in a database or xml file or whatever, and<br>
>>> then generate the conf file from it.<br>
>>> thank you.<br>
>><br>
>> Also, using a templating system with a scripting language (say, erb + ruby<br>
>> or whatever you're comfortable with) or the good old m4 may be viable, and<br>
>> probably simpler to use and implement. This is very easy and very convenient<br>
>> if you have to generate lots of different configurations (say, for n virtual<br>
>> hosts, or n virtual hosts on n servers) but which all share a limited number<br>
>> of prototype configurations.<br>
>> Bye<br>
>><br>
>>><br>
>>> On Mon, May 3, 2010 at 3:14 AM, Gabriel Evans <<a href="mailto:me@gabevans.com">me@gabevans.com</a>> wrote:<br>
>>>><br>
>>>> There's no API that I know of, unless you want to make your own module.<br>
>>>> You could try having a separate directory for virtual hosts included and use<br>
>>>> a database to store and generate the configuration. It'd be a lot easier<br>
>>>> than trying to interpret the configuration as well.<br>
>>>><br>
>>>> On Sun, May 2, 2010 at 4:21 AM, Ziyad Saeed <<a href="mailto:myschizobuddy@gmail.com">myschizobuddy@gmail.com</a>><br>
>>>> wrote:<br>
>>>>><br>
>>>>> Inorder to make a simple UI for editing nginx.conf. I need a way to<br>
>>>>> edit nginx.conf without having to open it up in a text editor. Does nginx<br>
>>>>> have an api that i can use to edit information that is inside nginx.conf.<br>
>>>>> This will help newbies add virtual host information and edit parameters via<br>
>>>>> a UI.<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>
>><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>
>><br>
><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>
><br>
><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>