3

Very weird problem on IIS. Never had it before:

localhost works, but 127.0.0.1 does not. localhost pings to 127.0.0.1. www.mydomain.com also pings to that IP, which is set up in the hosts file, but that also doesnt work locally. I've ipconfig /flushdns 'd without success. Ive even restarted the server. Another server set up the exact same way works fine. Any ideas?

To be clear, im accessing the URLs in IE like this:

I can telnet to port 80 without a problem for all 3

ChickenMilkBomb
  • 419
  • 6
  • 14
  • 2
    I've got the IPs pointed to "all unassigned". There's also a blank hostheader with port 80. – ChickenMilkBomb Mar 10 '10 at 03:07
  • Just a sanity check: Are you trying this in a web browser? Are you putting http:// in front of the IP address? – William Mar 10 '10 at 03:49
  • Is there a difference between telnetting to localhost vs 127.0.0.1 on port 80? – jdizzle Mar 10 '10 at 04:40
  • yes - i am putting http in front. – ChickenMilkBomb Mar 10 '10 at 05:26
  • I can telnet on port 80 to all 3, the IP, localhost, and the domain. – ChickenMilkBomb Mar 10 '10 at 05:29
  • by default your hosts file will have an entry # 127.0.0.1 localhost just verify if it is commented or uncommented. Also make sure you don't have ListenOnlyList added in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP\Parameters. Check the article http://support.microsoft.com/kb/890015 – Vivek Kumbhar Mar 10 '10 at 05:43
  • At this stage (verified connectivity, but getting inconsistent results from your current browser), if I were troubleshooting, I would test with another browser. This will help verify if the problem is specific to your current browser or the server. – Jason R. Coombs May 06 '10 at 12:02

2 Answers2

2

I have seen this a few times and it is usually caused by an incorrect proxy server configuration. If you can access it via telnet (this would not be going via the proxy) then you have effectively verified that a service of some kind (not necessarily IIS!) is running on that port.

I recommend disabling the auto-detect proxy option if you are using Internet Explorer and are not using a proxy or if you must use a proxy add explicit declarations for exceptions rather than relying on the "Bypass Proxy for Local Addresses" checkbox.

Dan
  • 852
  • 1
  • 8
  • 27
0

It sounds to me like a Named Virtual Hosting problem. Basically I think the problem is that you didnt' create virtual hosts for the other hostnames(in this context, an IP address qualifies). I'm not super familiar with IIS, but in apache, this is exactly what you are describing. The answer would be to disable virtual hosting.

The telnet 80 questions you get aren't complete. telnet to the IP address and run these commands(you'll have to do it three times)

GET http://SERVERNAME/ HTTP
**ENTER**
**ENTER**

it should give you the index page back, and it should be the same in all cases

Richard June
  • 728
  • 4
  • 7
  • I can get the pages using telnet without a problem – ChickenMilkBomb Mar 10 '10 at 16:54
  • Can you be more specific about "it fails locally" if you telnet to the system and do get http://SERVERNAME/ HTTP **ENTER** **ENTER** and you get the proper HTML document, that indicates everything is working properly on the server side. So how does the browser actually fail? – Richard June Mar 10 '10 at 21:56
  • In this case it is not likely to be a named virtual hosting problem. He has selected the "All Unassigned" option in IIS, and is accessing it via IP address also, this should present the default site, and in the case of Apache, the first listed VirtualHost. – Dan May 06 '10 at 10:51