Page 1 of 1

Parse and Manage Web server Configuration with PHP script.

Posted: Tue Mar 05, 2013 9:49 am
by brahama
Hi guys,

I set up an nginx as reverse proxy and did some scripts so hosts could be added automatically just by entering the name and ip. Pretty basic.

Now i am interested in creating a script to manage the whole configuration files of nginx so it can be customized from a basic UI. The first thing that came to mind is to use xml. but before i reinvent the wheel i thought to send an email and perhaps getting some ideas.

My plan was to use xml and create the xml file from the fresh install conf files that i built. I would add a tag enable for instance in each or the elements that are able to be customized. and then re-create the nginx configuration file according to this. Also comes to mind that if i need to add something to the configuration from the UI, i will probably need some way to identify where in the conf it should go. Well. thats all; a nice challenge i think.

Any hints are really appreciated.

Thanks!