Simple Note of Nginx Hosts Multi Domain
you can just use the server_name
directive to set the domain name of the server.
1 2 3 4 5 6 7 8 9 10 11
| server { listen 80; server_name www.domain1.com; root /var/www/domain1; }
server { listen 80; server_name www.domain2.com; root /var/www/domain2; }
|