With the new Lion Update comes better support for IPv6, however this seems to have broken the /etc/hosts file from allowing multiple domains per line.
So I would have something like this in my /etc/hosts file:[code]127.0.0.1 staff.example.local127.0.0.1 images.example.local127.0.0.1 anytime I made a request in Chrome to any of those domains, it would take 5.01 seconds.
At first I thought it might be a bug with the new version of MAMP for OS X Lion.
But I found using Chrome’s & Fire Fox’s developer tools that it was taking 5 seconds for the DNS lookup, and 0.01 seconds for the rest.
So I would go into my terminal and ping the domain. Apparently, the terminal and some of the BSD Unix tools correctly use /etc/and the correct order of /etc/hosts first and then DNS servers.
However, everything else on OS X Lion, including all of your Applications, do it backwards!
This wasn’t the case in Tiger, Leopard, or Snow Leopard.
This is where your computer would set “localhost” is the IP “127.0.0.1”. For example, when I work on joind.in, I use MAMP and create a Virtual Host for the code under the server name local.(i.e. I don’t have access to the DNS, so I create an entry in my /etc/hosts file.
You have to have admin permissions to edit the file, so I normally run the command “sudo nano /etc/hosts” and make my changes and then save.
This morning I was up a few hours earlier than normal today, and was looking forward to getting in some solid programming hours earlier so I wouldn’t work late tonight.
Instead, I spent about four hours fighting a new change (I’d call it a bug) in Mac OS X Lion.
It appears that Multicast DNS (m DNS), which is used in Apple’s Bonjuor for network discovery without a tradition DNS Server, has the Top Level Domain .local reserved for special m DNS functionality.