Nginx Vhost /

Filename Size Date modified Message
934 B
872 B
The Nginx Vhost project exists to provide a simple shell script to generate a vhost directory.
This project is built on/for Ubuntu servers, and will likely not work on other platforms.


Expects script to be executed by a user that can write to /var/www.
Expects Nginx to already be installed, and expects user to restart Nginx when the vhost is ready.

Bottom of /etc/nginx/nginx.conf "http {" block should have a line like the following:
    include /var/www/*/config/nginx.conf;

Example setup and usage:
# hg clone /var/www/
# cd /var/www/
# chmod +x generate_vhost # Make the script executable
# /var/www/generate_vhost # Execute the script

Files are then copied into /var/www/ (VHOSTDIR) as /var/www/
That directory contains:
config/     # Per-domain nginx config is stored here