Can't access 127.0.0.1 from Windows 8.1

2

I have a really strange problem with my Windows 8.1 Pro laptop: I can't access 127.0.0.1 from any web browser. But wait, it gets weirder!

The setup

My OS has installed (among others) the following programs:

  • XAMPP server with Apache, PHP and MySQL servers running at the usual ports (80, 443 and 3306)
  • Spotify
  • JDownloader 2

Just to make sure I've already read most other questions about this topic, here are some related aspects:

  • I'm quite sure this is not about malware
  • My HOSTS file is the default one that came with Windows
  • In the dialog "Local Area Network (LAN) Settings" I have only checked "Automatically detect settings"
  • Both IPv4/IPv6 protocols have this configuration:

Default configurations

The problem

Although I can access my local web server from http://localhost/, visiting http://127.0.0.1/ from Google Chrome returns ERR_NETWORK_ACCESS_DENIED. It doesn't work on IE or Firefox either.

The real deal here is that I can also access the local web server from http://192.168.1.XXX/ (whatever local IP address has my machine).

So, what about Spotify and JDownloader?

Grad you asked! Here's why I'm so worried about this problem: this also affects other programs in my computer.

For those who didn't know, Spotify has a built-in web server that allows to play songs from the web (more info at https://stackoverflow.com/questions/7580175/what-is-the-advantage-of-having-a-domain-name-spotilocal-that-resolves-to-127). Playing around with this awesome feature, I realized it didn't work in my computer:

Spotify
(Click image to enlarge)

As you can see, all calls to spotilocal.com (which is 127.0.0.1) are being denied.


Another example is JDownloader 2, that has also a built-in web server (https://support.jdownloader.org/Knowledgebase/Article/View/42/0/jd-opens-my-browser-to-display-captchas).

Whenever JDownloader needs the user to solve a captcha, it opens a URL like this in the default browser: http://127.0.0.1:24613/XXXXXXX/?id=XXXXXXXXXXXX

Of course, I always get ERR_NETWORK_ACCESS_DENIED.

Any help would be appreciated. Thanks in advance!

EDIT

In response to all the things I forgot the mention:

  • Ping to 127.0.0.1 works fine: Ping 127.0.0.1
  • I can access XAMPP from http://[::1]/, but not Spotify or JDownloader (from their respective ports)
  • In XAMPP's "httpd.conf", listen line is Listen 80 and servername is ServerName localhost:80
  • I have Kaspersky Internet Security 2016 installed, but the problem persists when I turn it off

josemmo

Posted 2016-01-14T11:28:04.210

Reputation: 121

3Where did you bind IIS to? The IP 127.1 or to localhost? (for HTTP this will matter since it uses the name is the webserver in its requests so it can serve different pages on the same IP). – Hennes – 2016-01-14T11:38:25.853

1Can you access http://[::1]/? – user1686 – 2016-01-14T11:42:35.577

And what happens if you use a different browser? – qasdfdsaq – 2016-01-14T13:28:51.893

Any software firewall installed? – Jonno – 2016-01-14T13:53:19.637

There should be a disabled entry in hosts file (Windows/system32/drivers/etc) : " # 127.0.0.1 localhost" . Can you enable it by deleting "#" and try again? Normally DNS should resolve this but deleting it will help you to detect if the problem is in your DNS configuration. – conquistador – 2016-01-14T14:20:32.087

In most web sever application configurations you have to indicate you want it to work with both localhost and 127.0.01 by default they won't work with both or neither depending on the configuration. – Ramhound – 2016-01-14T14:26:58.350

@Jonno, I have Kaspersky Internet Security 2016 installed, but it makes no difference when I turn it off – josemmo – 2016-01-14T16:40:41.090

@qasdfdsaq, just the usual "This page can't be displayed" :( – josemmo – 2016-01-14T16:42:03.110

When you do a ping localhost, what IP gets pinged? – David Schwartz – 2016-01-14T18:31:03.277

Answers

0

I finally solve the problem!

Apparently, the LAN driver wasn't working as it has to be for whatever reason, so I uninstalled it and then I installed the latest version.

Just in case anybody has the same problem as I had, my LAN driver is "Qualcomm Atheros Performance Suite", also known as "Killer Network Manager".

josemmo

Posted 2016-01-14T11:28:04.210

Reputation: 121

0

Given your recent edit, change the ServerName localhost:80 to ServerName *:80 for Apache.

What this does it look at the request coming in for the server name, and sees that it will respond to requests going to localhost (not 127.0.0.1) on port 80. What we want is for it to listen on any interface or IP address that system has, and server the website on port 80.

Yes, localhost should always resolve to 127.0.0.1, but if that's not what the request is, we need to match it somewhere. Currently, there's no match. Using *:80 means any requests that are not matched earlier will go to that configuration stanza.

Canadian Luke

Posted 2016-01-14T11:28:04.210

Reputation: 22 162

-1

Do you have skype open? It likes to bind port 80 by default, which can cause annoying issues like this.

Ryan Gooler

Posted 2016-01-14T11:28:04.210

Reputation: 1 844

Excellent point. I had an issue where I had iis and apache fighting for the same port. If skype isn't the issue there could be another program jamming the port that spotify and JDownloader use. – Kavinci – 2016-01-14T12:45:05.860