Apache works, 127.0.0.1 is accessible, but http://localhost/ is not
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.