Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an AWS web server - call it box.company.com. It's running IIS and if I visit http://box.company.com in a web browser (from any machine, including box.company.com), it responds correctly with our site. However, if I visit localhost/ or 127.0.0.1/ when I'm logged into box.company.com, I get a "couldn't connect to host" message.

The hosts file has only one entry - the standard "127.0.0.1 localhost" line. Pinging 127.0.0.1 works fine. Pinging localhost correctly resolves to 127.0.0.1 and works fine.

I've tried restarting IIS and restarting the DNS Cache. I had this problem once before, and restarting the server fixed it, but I'd like to know what's going on in case this happens again in the future.

share|improve this question
    
A couple updates. The site also stopped responding to box.company.com locally. Restarted and now everything works again. –  Jordan Jun 27 '11 at 16:10
add comment

1 Answer

What's the IIS site's binding config look like? What this sounds like is that it's configured to listen on a specific IP (or all IPs with a specific host header), to the exclusion of localhost.

share|improve this answer
    
Not really sure how to format this, but... (dash means the column is empty) (Type,Host Name,Port,IP,Binding Info) [http,-,80,,-],[https,-,8443,,-],[net.tcp,-,-,-,808:*],[net.pipe,-,-,-,*],[net‌​.msmq,-,-,-,localhost],[msmq.formatname,-,-,-,localhost] For what it's worth, this is the same as the config on another one of our machines that doesn't have this problem –  Jordan Jun 27 '11 at 15:56
    
Don't place it in a comment to an answer. It's information that is part of the question. Edit it into your question. Then you'll be able to format it. –  JdeBP Jun 28 '11 at 14:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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