What's the best practice regarding using Nginx configuration files in sites-available ?
* Option 1 *
One configuration file for multiple domains:
/etc/nginx/sites-available/default
server {
server_name www.example.com;
}
server {
server_name www.domain.com;
}
* Option 2 *
A separate configuration file for each domain:
/etc/nginx/sites-available/example.com
server {
server_name www.example.com;
}
/etc/nginx/sites-available/domain.com
server {
server_name www.domain.com;
}
I understand that separate files for each domain might give more flexibility because the sites are easier to switch on/off with symlinks in /etc/nginx/sites-available/
Is there any difference between the two options regarding speed?
Are there any advantages of using "option 1" (everything in one file)?
-------------------------------------------------------------------
Peter Martin, Joomla specialist www.db8.nl
Raspberry Pi with Raspbian Linux + Nginx + PHP (with php5-fpm) + MySQL