I can not access http://localhost but http://127.0.0.1 works fine

localhostwindowswindows-vista

My http://localhost is not working. But the address http://127.0.0.1 is working fine. I have multiple webservers installed on my computer and it is the same problem with them all.

I think, but I don't know, that the problem started when I installed IIS, but I have inactivated IIS now.

I am using Windows Vista. How can I make http;://localhost working again?

Best Answer

Check your hosts file - this is where host names are resolved in first place. Normally, you should find this line there:

127.0.0.1 localhost

If not, add this line, save it and then test again, whether it works.

The hosts file can be found at: %WINDIR%\system32\drivers\etc

You can edit this file with any text editor (e.g. notepad).

Related Question