Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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 ^_^

share|improve this question
    
have you tried turning it on and off again? aka restarting apache? –  FLY Dec 14 '11 at 11:38
    
Thats because you have configured localhost to point to ipv6 loopback address and apache only listens to 127.0.0.1. Reconfigure apache to listen to the ipv6 loopback or point localhost to 127.0.0.1 –  mspasov Apr 21 '12 at 20:14
add comment

3 Answers

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.

share|improve this answer
add comment

dig localhost should return 127.0.0.1 . 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

;; QUESTION SECTION:
;localhost.         IN  A

;; ANSWER SECTION:
localhost.      3600    IN  A   127.0.0.1
share|improve this answer
add comment

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.

share|improve this answer
    
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 Oct 15 '11 at 7:54
    
Post your hosts file contents up on pastebin then reply back with the link. –  l'L'l Oct 15 '11 at 11:14
    
See it in my question )) –  NiLL Oct 15 '11 at 16:54
    
Do you have the original one, from before the changes? –  l'L'l Oct 15 '11 at 17:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.