# Apache Help: Not finding localhost



## mattt (Dec 31, 2005)

My browser can not resolve http://localhost/, but http://127.0.0.1 works fine.

This is the Virual Host section that I'm using in /etc/httpd/httpd.conf

### Section 3: Virtual Hosts
NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
	DocumentRoot /Library/WebServer/Documents
	ServerName localhost
</VirtualHost>
<VirtualHost 127.0.0.1>
	DocumentRoot /Users/mattthiessen/Sites/clients/bpwww
	ServerName bpwww
</VirtualHost>

The settings in NetInfo Manager are

/machines/localhost/
  myname = 127.0.0.1
  name = localhost

However, after turning on box with Fedora Core 4 that is on the same network http://localhost  brings up the index.php page on that machine.

Is there anything else I need to set to the http://localhost to work?


----------



## mattt (Jan 1, 2006)

It was a DNS issue.  My problem was in the lookup order.  Found using:

lookupd -configuration

My problem was fixed after following these instructions:

http://www.geektimes.com/macintosh/os/x/10_3/and/dns.html


----------

