First, check the obvious: are there any typos in the file?
Next, test out the name resolution. Something simple like pinging the web server by it's FQDN will do. See if the right IP is mentioned.
- If you get "unknown host", your client's hosts file does not have an entry for the FQDN you entered (check for typos in the host name), or, for some reason, your computer isn't reading your hosts file.
- If you get the wrong IP address, then you have the wrong IP in your hosts file (check for typos in the IP address), your computer's DNS cache is polluted (try:
ipconfig /flushdns
on a Windows machine), or something else is overriding the lookup (duplicate entries in the hosts file?).
Next up, try communicating with your web server. Using Telnet, speak HTTP to it, and see how it responds:
telnet 192.168.0.1 80
Substitute your web server's IP address instead of 192.168.0.1
. Provide the following lines:
GET / HTTP/1.1
Host: fqdn.mywebserver.com
Try the server's IP, server's netbios name, and finally the server's FQDN in place of fqdn.mywebserver.com
. Be sure to press return twice after entering the host header.
If the response is different between the netbios name and the FQDN, then it's a web server configuration issue; you need to adjust you virtual host settings (in Apache, the ServerAlias
directive should be used to add additonal names. In IIS its in Web Site (tab) -> Advanced (button)).
After that... I'm really out of ideas.