Virtual Hosts Issue on Nginx

Hi, so I set up my two sites by using the article posted here:

However, when I navigate to the second site I setup it displays the first site instead, so I have two domains pointing to the same content. I had this issue once already and reset my droplet to start over anew just in case I had messed something up installing everything… but it still persists.

I am on Ubuntu 12.04.3 x64 with a standard LEMP stack, nothing else installed.

First site ‘sites-available’ file:

Second site ‘sites-available’ file:

Thanks in advance. -Z

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hmm. Have you tried restarting nginx?

They are symbolic links back to the <code>sites-available</code> files. I just made sure that they are linked and it appears they are. <br> <br>If I try to navigate to and edit the <code>sites-enabled</code> directory, it opens the <code>sites-available</code>. Which is I believe working correctly.

Do both files exist in <code>sites-enabled</code>?