I have a brand new install of Windows 2012 Server, and trying to set up a simple web site. I'm able to hit the default web site (returns the IIS 8 home page) using the IP address. But I'm getting a 404 on a newly created site containing a single .html page.
Here are the steps I took on the server:
1) Create a new site (leave all default settings, except:)
2) Set host name (header) to "test" (leave IP at *, port at 80)
3) Set physical path to wwwroot\test
4) Create a single index.html file under wwwroot\test
Here are the steps I took on my client (Windows 7 Pro):
1) Update hosts file to point "test" to server IP (verify through ping of "test" that it resolves to right IP)
2) Browse to test/index.html
HTTP Error 404. The requested resource is not found.
- I checked the logs, and no activity is getting logged for "test" -- all I see are logs for the default site requests.
- If I stop the default site and just browse to the IP, I get the same 404.
- If I stop both sites and browse to the IP, I get a connection timeout.
- If I stop both sites and browse to "test", I get the same 404.
- Inspecting the "test" (404) request through Fiddler, the headers are:
HTTP/1.1 404 Not Found
Content-Type: text/html; charset=us-ascii
Date: Sat, 22 Jun 2013 04:39:10 GMT
- Inspecting the default site (200) request through Fiddler, the headers are:
HTTP/1.1 200 OK
Last-Modified: Sat, 22 Jun 2013 02:45:45 GMT
Date: Sat, 22 Jun 2013 04:58:31 GMT
Further, after pulling the network cable on the server:
- Pinging "test" still responds and resolves to the server's IP (127.168.1.125)
- Checking my router, I confirmed that 127.168.1.125 was mapped to the new web server
- Browsing to the default site continues to time out
- Browsing to "test" still gives me the 404
- Inspecting the request IP in Fiddler confirms that requests to "test" are resolving to the right IP (127.168.1.125)
It seems, based on the results after pulling the network cable that it's not an issue w/ the server (same thing happens whether or not cable is plugged in), but based on the Fiddler results, the client is doing everything it's supposed to do (routing to the right IP, and still getting a 404 even when it's not connected).
There are so many things going inexplicably wrong:
- Why am I getting a 404 on "test" even when the cable is unplugged?
- Why is my ping responding even when the cable is unplugged?
- Where is the 404 even coming from, if the server is not serving it?
- Why does browsing to the IP when the default site is shut down give me a 404?
I don't know what else to troubleshoot at this point. And the more I troubleshoot and try to rule things in/out, the muddier the waters get.
I never would have imagined getting a simple site with a single html page on a brand new server install would give me so much trouble.