Single nginx configuration for multiple sub domains
- by Peter Smit
I have the following directory structure for my websites:
/var/www/sitename/subdomain/(public|log)
e.g /var/www/stackoverflow.com/careers/public/index.html
Can I make a single generic nginx configuration to do this? So that every domain is mapped to the right directory? I would not like to edit my nginx configuration for every website I add.
The root domain can always be mapped to the www subdomain.