Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For the longest time I was a MAMP user, until yesterday, something went terribly wrong and MAMP would no longer start mysql. Long story short I decided to ditch MAMP and just setup my own AMP server, so I found a good tutorial and set one up. All was working well until I went to create a virtual host. One step of the directions had me editing the /etc/apache2/httpd.conf file. I somehow managed to delete much of that file and saved it - UGGG! Since then I have been unable to resolve http://localhost.

I was able to locate the contents of the httpd.conf file on another mac and replaced the contents and saved, then restarted apache, and still I am unable to resolve http://localhost. I get the error: Oops! Google Chrome could not connect to localhost.

In Terminal I am able to ping localhost and I get the result 64 bytes from icmp_seq=0 ttl=64 time=0.044 ms

I am completely at a loss here, as far as I can tell I have reset everything back to the way it should be. Here is what I am checking:

/etc/hosts /etc/apache2/httpd.conf

I have restarted apache, and my computer a number of times to no avail.

And both files, as far as I can tell are set as they would be from a fresh install.

Can anyone offer some advice here? Is there a way that I can further trouble shoot this issue? A log that I can look at? I really need to get this local environment back up and running and would prefer to not need to reinstall my entire OS. Any direction is greatly appreciated!

share|improve this question
ping will always resolve localhost, it's unrelated. The problem seems to be solely with Apache, OS X has nothing to do with it. Just re-install the Apache bundle to the same destination (uninstall it beforehand, if possible, or at least stop the server). Since you say you did a fresh install of the server not so long ago, re-installing it in the same location shouldn't make much difference, except positive one. – Desmond Hume Mar 2 '13 at 20:53
Does your hosts file contain the usual localhost entry? – Nicole Hamilton Mar 2 '13 at 20:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.