Fix OS X Lion problem with Hosts file
Marc-Antoine Ross July 26th, 2011 Add comment
Over the week-end I upgraded my Macbook Pro to OS X Lion. Great. Although I’m still debating whether I’ll get used to the “natural scrolling”, which doesn’t feel natural to me at all, the upgrade went almost flawless. I had to update Virtual Box (I should have done this way before). I also had issues with my hosts file not working anymore. After a bit of searching, I found out that the order in which your hosts appear in the hosts file needs to be changed in Lion. It should now look like this:
#staging
192.168.1.10 staging
#dev
192.168.1.11 dev
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
See? The localhost stuff is now at the bottom.
By the way, I now use Gas Mask, a great free utility to switch between dev, staging and production settings.

