Question

All domains go to same site, not following NGINX conf files

  • Posted on October 13, 2013
  • dixongeAsked by dixonge

I have three domains set up. One points to /var/www (my Ghost install) and works correctly. After a lot of troubleshooting my other two test domains now resolve, but they go to the /var/www location instead of the locations specified in their configuration files. Both .conf files include this:

listen 80; root /var/www/domainname.com; index index.php index.html index.htm;

server_name domainname.com;

Why are these configuration files not working?


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.

I had the same problem. And after restarting the server nginx would not start! <br>I got this error: nginx: [emerg] could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32 <br>When I increased server_names_hash_bucket_size to 64 nginx started and the problem I had before disappeared. <br> <br>Hope it helps.

Please pastebin all of your virtualhosts and the output of the command Pablo posted.

Have you restarted Nginx? If so, what’s the output of <code>ls -la /var/www/</code>?