On a Windows Server 2012R2 I can't open the local hosted site via 127.0.0.1, via localhost works. Ping of 127.0.0.1 works also.
On a Windows Server 2008R2 it works without any Problems.
What could cause this issue?
On a Windows Server 2012R2 I can't open the local hosted site via 127.0.0.1, via localhost works. Ping of 127.0.0.1 works also.
On a Windows Server 2008R2 it works without any Problems.
What could cause this issue?
Possible solution:
Check (drive letter)\Windows\system32\drivers\etc\hosts to see if it has an entry resolving 127.0.0.1 to localhost. If it does not, add it (default hosts file has inline comments to guide you). Also run ipconfig /flushdns before attempting it again.
Additionally check your firewall. I'm unaware of any cases it's actually ever blocked loopback (don't even know why it would) but may as well test it.
I could ping localhost and firewalls weren't on. I ran F12 debugger while it wasn't working and for some reason IE would abort without ever accessing the localhost site. I could access external sites successfully from the server. I could also access the server's site from a browser on a different system. However, I couldn't access sites hosted by the server from the server's browser whether I used localhost, the servername, the IP or FQDN.
To get it working, I did the following:
1) Set the back connection host names as described in the below article. At a minimum, you'd want to add localhost and the servername to the BackConnectionHostNames multistring value.
IIS Admin, and IIS Restart after the change.
2.Click Start, click Run, type regedit, and then click OK.
3.In Registry Editor, locate and then click the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
4.Right-click MSV1_0, point to New, and then click Multi-String Value.
5.Type BackConnectionHostNames, and then press ENTER.
6.Right-click BackConnectionHostNames, and then click Modify.
7.In the Value data box, type the host name or the host names for the sites that are on the local computer, and then click OK.
2) Disabled IE Enhanced Security Mode. (Go to Server manager -> Click Local Server on the left pane, and then in the server properties click the link next to IE Enhanced Security Configuration. Then turn it off for users and administrators.
3) Then, I had to run IE as an administrator by pinning IE to the task bar, right click on the task bar icon, then right click on the internet explorer icon in the popup menu, and clicking Run as administrator.
a. Open the localhost site that you want to access.
4) After that, I closed the IE instance that was an administrator and tried accessing the localhost site with regular privileges and was able to access the site.
NOTE: You may be able to open IE as administrator before doing any of the above steps to get the browser to browse localhost. However, the above steps made it so I could do it without having to run IE as administrator.