7
7
I've encountered a really strange Mac problem: Safari is unable to connect to localhost whereas all other applications can connect as normal (Firefox, Chrome, ping, etc.).
My /etc/hosts is the standard setup:
$ egrep localhost /etc/hosts
# localhost is used to configure the loopback interface
127.0.0.1 localhost
::1 localhost
fe80::1%lo0 localhost
127.0.0.1 testing.localhost
Question: Have anyone else encountered this? What could be the problem?
Update #1: I have a server running on localhost:8080. When accessing from Safari I get the error message "Safari could not connect to the server". "http://localhost:8080/" works flawlessly in Firefox and Chrome.
Update #2: Same problem with "http://127.0.0.1:8080/" - so it does not seem to be related to resolving localhost to 127.0.0.1.
Is there any remote chance your are using a proxy server? – BinaryMisfit – 2009-09-03T08:34:00.850
Diago: I'm not using a proxy server. – knorv – 2009-09-04T08:17:01.300
1What's the http server running on localhost? – None – 2009-09-06T10:55:54.953
1For the archives (see comments at grawity's answer), though it does not solve the question above: on my Mac OS X 10.6, with the
/etc/hosts
as above and IPv6 left at its default automatic, requesting 127.0.0.1:8080 makes Safari use IPv4 (which could still connect to a server providing IPv6). Requesting localhost:8080 makes Safari use IPv6. – Arjan – 2009-09-07T15:14:14.987how about sniffing to see what the difference is between the two browsers' requests? – mihi – 2009-09-08T17:28:55.850
@knorv, can you tell us how you solved it? – Arjan – 2009-09-10T14:54:19.127