I'm trying to have multiple sites on the same server. I have a DigitalOcean VPS with Debian and Nginx. Whatever I go to site1.com, site2.com or site3.com, the site shows the site1.com content. Also, when I type www.site.com, www.site2.com or www.site3.com Chrome shows "This webpage is not available"
On .../sites-available/ and .../sites-enabled/ I have the site1.com, site2.com and site3.com files with the following content. This is from site1.com:
server {
listen 80;
server_name site1.com www.site1.com;
access_log /opt/www/site1.com/access.log;
root /opt/www/site1.com; }
This is from site2.com:
server {
listen 80;
server_name site2.com www.site2.com;
access_log /opt/www/site2.com/access.log;
root /opt/www/site2.com; }
And from site3.com:
server {
listen 80;
server_name site3.com www.site3.com;
access_log /opt/www/site3.com/access.log;
root /opt/www/site3.com; }
What am I doing wrong? As you may predict, yes, this is my first time setting up a Nginx server.
Thanks for your help!