A question about Localhost with Safari

René J.V. Bertin rjvbertin at gmail.com
Sat Jan 3 17:00:15 PST 2015


On Saturday January 03 2015 18:45:15 Ryan Schmidt wrote:

> I experience the problem on Yosemite that "localhost" will randomly switch between accessing the IPv4 address of my server (which works) and the IPv6 address of my server (which apparently isn't working). I've had to start using "127.0.0.1" instead, which is the IPv4 address. This does not appear to be specific to Safari; I saw it in the terminal with curl too.

I had similar issues a long time ago already, already back in October 2006 I commented out the line with the IPv6 localhost address in /etc/hosts. I've never noticed any side-effects, and using IPv6 when you're behind a router that probably assigns addresses from a private netblock like 192.168.0.0/16 is completely unnecessary.

I've never tried, but it might be enough to deactivate IPv6 support in the Network Location settings if you prefer not to touch /etc/hosts.

R.


More information about the macports-users mailing list