How can I eliminate slow resolving/loading of localhost/virtualhost (a 2-3 second lag) on Mac OS X Lion?

前端 未结 13 845
梦毁少年i
梦毁少年i 2020-12-04 06:00

Since setting up my development environments on Mac OS X Lion (brand new macbook air purchased in January 2012), I have noticed that resolving to a virtual host is very slow

13条回答
  •  情深已故
    2020-12-04 06:33

    I had this same problem and finally realized I had the same host entry twice on the same line:

    e.g.

    127.0.0.1 localhost host1 host2 host3 host4 host5 host1 host6
    

    I removed the second instance of the same host (in the example above - host1) - and things immediately sped up.

    Felt a little silly when I discovered this, but when you've got 10 long host names on the same line and you're frequently adding / removing, it can be eaisly overlooked.

提交回复
热议问题