When I type the domain name I linked to my server IP, one of the virtual host websites I have on the server comes up, rather than the index.html file I have as default on the server. Why is this so? I am using Nginx, these are my configuration files:

default http://pastebin.com/ByQDCAsb

the domain that gets served (replaced domain with mysite.com) http://pastebin.com/CYJXgkWm

To let Nginx process the "default" directive, you may do the following two changes.

  • Change listen 8080; to listen 8080 default_server;
  • Change server_name localhost; to server_name _;

Please let me know, if it works (or not).

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.