Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am able to visit 127.0.0.1. When visiting localhost, it is not able to resolve.

Here is /etc/hosts

127.0.0.1       localhost # suppose to list all folder + files under /var/www, when visit localhost.

127.0.0.1       mymachine # aegir

127.0.0.1       languages.local #drupal 

127.0.0.1       languages.localhost #drupal

-- The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
share|improve this question
1  
Could you please also add the terminal output of: "host localhost" And what happens when you try to visit mymachine –  AgentK Jun 7 '12 at 2:00

2 Answers 2

Try to ping localhost and try to chmod etc/hosts

to 644

share|improve this answer

Need to know what "visit" means, please - are you referring to typing http://localhost into the address bar in a browser? If so, which browser? Are you typing the http:// part in, or only typing localhost?

Also, please post output from the following:

ping -c 1 127.0.0.1 ; ping -c localhost ; host localhost

share|improve this answer

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.