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 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: <html><body><h1>Site 2</h1><p>Working</p></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.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.