NginxVhostManager
Create, list and remove nginx virtualhosts (proxy) in seconds
You can also:
- Reload nginx without errors
Requirments
The following commands must be executed as root, reple nodeUsername with the user that will run the node script
$ setfacl -m u:nodeUsername:rwx /etc/nginx/sites-available/$ setfacl -m u:nodeUsername:rwx /etc/nginx/sites-enabled/ $ cd /etc/init.d/$ touch node_nginx$ echo "nodeUsername ALL=/etc/init.d/nginx" >> node_nginx$ echo "nodeUsername ALL=NOPASSWD: /etc/init.d/nginx" >> node_nginx
Functions
var vhost = ; vhost; vhost; // List all created vhosts vhost;