3

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
2
  • 2
    Could you please also add the terminal output of: "host localhost" And what happens when you try to visit mymachine
    – AgentK
    Jun 7, 2012 at 2:00
  • Try to ping localhost and try to chmod etc/hosts to 644
    – Da1T
    Nov 18, 2012 at 20:42

1 Answer 1

0

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

3
  • This is comment, not an answer. Someone with that much rep should know it already.
    – user589808
    Oct 3, 2016 at 7:59
  • 1
    @CelticWarrior, you just necro'd a five year old answer of mine to complain that "someone with that much rep should know better" than to have phrased it as an answer rather than a comment. Ahem.
    – Jim Salter
    Oct 4, 2016 at 18:06
  • Those are the perils of using the Android SE app before my morning espresso. The stupid app shows answers in a way that make no sense. This one appeared as being "new" and I didn't pay attention to the (very pale gray) date. Sorry.
    – user589808
    Oct 4, 2016 at 18:09

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