localhost is working but not 127.0.0.1 in windows 7
Two or three shot in the dark guesses. This is how I would diagnose the issue.
It's possible that your web browser is resolving
localhost
on your computer to the IPV6 loopback address,::1
. Compare the results of typinghttp://[::1]
and compare the results tohttp://127.0.0.1
andhttp://localhost
to see if that reveals anything. As to why xampp is working on IPV6, but not IPV4 is another issue.You might have a web proxy installed on your network and your Internet Options or browser settings is configured to use it. This will bypass DNS and the hosts file and send the request straight to the proxy. And the proxy server probably resolves 127.0.0.1 and localhost differently. This also applies to any sort of local proxy, internet speed-up software, anti-virus scanner, Fiddler, etc... Try going to Control Panel->Internet Options and select the Connections tab. Then select the "LAN settings" button. Make sure all the checkboxes are turned off on this dialog. Run the "Setup" button at the top of the Connections dialog just to be sure. See picture below
Disable the Windows Firewall and/or any other sort of Firewall software you may have. Just so we can rule that out. Any change?
But your BEST option will be to install Wireshark or Netmon and get a trace of
http://localhost
connection and compare that to thehttp://127.0.0.1
address. That should reveal something...
What I had to do was:
1) Make sure I had all files located inside of C:\inetpub\wwwroot
backed up somewhere, just in case.
2) Go to the windows search
OR control panel
and openTurn Windows features on or off
3) The box next to Internet Information Services
needs to be checked (it will appear as a green square inside of the grey square).
4) Now I can type 127.0.0.1 or http://localhost and get the correct page which should look like this image
5) Profit
.