Apache works, 127.0.0.1 is accessible, but http://localhost/ is not

hostsNetwork

In 10.7.2 update Apple roll out new bug, – hosts bug. This crashed broken hosts. I had tried install and configure dnsmasq, reconfig /etc/hosts/, and after this manipulations http://localhost/ doesn't load. If you need more info, please request it ))

My /etc/hosts file:

127.0.0.1   localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
#

My /etc/resolv.conf file:

#
# Mac OS X Notice
#
# This file is not used by the host name and address resolution
# or the DNS query routing mechanisms used by most processes on
# this Mac OS X system.
#
# This file is automatically generated.
#
domain RT-G32
nameserver 8.8.8.8

dig localhost

ps sorry for a little broken english ^_^

Best Answer

Also check to see that there is a loopback interface configured for 127.0.0.1; it should be lo0:

#ifconfig 
lo0: flags=8049 mtu 16384
    options=3
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
    inet 127.0.0.1 netmask 0xff000000 
    inet6 ::1 prefixlen 128 

If there is no interface attached to the IP address, then the packets have nowhere to be delivered.