if localhost isn't set in the hosts file, it won't work and you'll have exactly the problem you've described
Also if your config file is damaged or you have some strange config entries, it won't work
@hoffi 127.0.0.1 isn't always localhost because you can manipulate it
eg
change it in your hosts file ( c:\windows\system32\drivers\etc\hosts or /etc/hosts )
to
Code:
212.53.128.131 localhost
#127.0.0.1 localhost
127.0.1.1 bt.foo.org bt
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
and check localhost in your browser or check the ip via ping or run a trace to see where "YOUR LOCALHOST" is