# Apache won't start up



## Matsaki (Apr 16, 2008)

And I'm getting crazy here! I just had my new Macbook Pro 2.4, Mac OS X 10.5.2 and decided to make a totally fresh install. Installed MySQL and stared PHP etc. Working great.

But now I can't get my Apache to work. I have been following all tutorials on the net and looking around. Web sharing and so on and on.

MySQL is working fine but and http://localhost/ attempts resumes in:



> Safari cant open the page http://localhost/ because it could not connect to the server localhost.



What the xxx am I doing wrong?? also the "/var/log/apache2" is empty


----------



## aicul (Apr 17, 2008)

You have a done a clean install. So maybe you just have to activate websharing in preferences/sharing.


----------



## Giaguara (Apr 17, 2008)

Does 127.0.0.1 give teh same result?
Can you ping your port 80?


----------



## Matsaki (Apr 17, 2008)

Problem solved. But thanks guys


----------



## uberwiess (Feb 7, 2009)

Glad to hear that you fixed your problem. Would you mind sharing what was wrong? I'm having the same issue!
I get the same not found message for 127.0.0.1, but I can ping localhost. Any ideas what's wrong?


----------



## uberwiess (Feb 8, 2009)

I got it working. Here's what I did:
In the terminal, I entered "sudo apachectl configtest" to see if I had any errors in Apache's config file. There weren't. But looking at error logs in the console told me that Apache couldn't find a certain log file, so after some googleing, I did this:
cd /private/var/log
sudo mkdir apache2

Everything works fine now!


----------



## chuanist (Nov 3, 2009)

Many thanks! My system's browsers all gave me the same error when asked to display localhost. Creating the apache2 directory in logs did the trick for me too.


----------

