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:   localhost 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

dig localhost

ps sorry for a little broken english ^_^

  • have you tried turning it on and off again? aka restarting apache?
    – FLY
    Commented Dec 14, 2011 at 11:38
  • Thats because you have configured localhost to point to ipv6 loopback address and apache only listens to Reconfigure apache to listen to the ipv6 loopback or point localhost to
    – mspasov
    Commented Apr 21, 2012 at 20:14

3 Answers 3


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

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

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


First, how are you trying to edit your hosts file? It's important information, since it's critical upon doing any type of edit that it's done a certain way. Also, if you could explain in more detail the exact issues you seem to be experiencing that would help too.

I'm not understanding how this is different from what you asked yesterday:

How set up a local domain such as local.test?

I'll take a look at your hosts file if you would like, just let me know.

  • Of course, I had been edited hosts file such as root in nano.Different between yesterday and today very big, today I've tried all possible hosts file in your question.
    – NiLL
    Commented Oct 15, 2011 at 7:54
  • Post your hosts file contents up on pastebin then reply back with the link.
    – l'L'l
    Commented Oct 15, 2011 at 11:14
  • See it in my question ))
    – NiLL
    Commented Oct 15, 2011 at 16:54
  • Do you have the original one, from before the changes?
    – l'L'l
    Commented Oct 15, 2011 at 17:02

dig localhost should return . Check if the DNS on your machine is running.

dig localhost

; <<>> DiG 9.7.3-P3 <<>> localhost
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20521
;; flags: qr; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;localhost.         IN  A

localhost.      3600    IN  A

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .