Fix OS X Lion problem with Hosts file

Marc-Antoine Ross July 26th, 2011

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.

Entry Filed under: General

Leave a Comment

Required

Required, hidden

Some HTML allowed

Trackback this post  |  Subscribe to the comments via RSS Feed

Schedule

July 2011
M T W T F S S
« May    
 123
45678910
11121314151617
18192021222324
25262728293031