MAMP and virtual local hosts / IPv6

Recently I recognized that my local access to virtual hosts created with MAMP ( http://mamp.info/ ) is pretty slow. It takes a couple of seconds to actually send the request.
MAMP (Pro) adds virtual hosts to the /etc/hosts file on mac with 127.0.0.1 as its IP-address, so that I could just enter http://myapplicationname:8888 to get to the local development environment of my app.
As I got similar timeouts accessing my hosts when I enabled IPv6 for them I guessed that there was a connection.
Adding the 127.0.0.1 equivalent for IPv6 ( ::1 ) did the trick then finally.
Add
::1 myapplicationname
to the /etc/hosts and it works blazing fast as regular.

Seems like OSX nowadays always does an IPv6 lookup, even for localhosts.

About these ads

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: