I followed this tutorial: https://www.digitalocean.com/community/articles/how-to-set-up-nginx-virtual-hosts-server-blocks-on-ubuntu-12-04-lts--3
I have two websites: web1 and web2 and their respective directories on the droplet are:
In my sites-available directory I have a file called 'sites'. The contents of the file is here: http://pastebin.com/0yz3Lrwt
I have two files in the /etc/nginx/global directory: common.conf and wordpress.conf. - The contents of each is:
I created a symbolic link from sites-available to sites-enabled and I have checked inside the sites-enabled directory and the only link in there is the one for the 'sites' file.
In the public_html directory for web2, I have index.html containing the following HTML:
The problem is that when I go to both web1.com and web2.com it comes up with the following text: "Site 2 Working". It seems like web1 and web2 are both pointing to /var/www/web2/public_html, when web1 should be pointing to /var/www/web1/public_html
Anyone have any ideas? I've been stuck on this for a couple of days and can't work out how to get past it.