nDarkness

OS X – Apache Web Sharing Starts But You Are Unable Connect

by on Sep.06, 2010, under Mac OS X, Software

In an effort to save you an afternoon of searching, I thought I would post this to help the OS X users having this issue. There are the usual causes of no content in the web root, firewall blocking requests, incorrect permissions and/or httpd.conf syntax errors. The one error that is a little tougher to track down is apache not being able to create log files. Check the line in the httpd.conf file that shows the path to apache’s log file. It should look something like this:

ErrorLog “/private/var/log/apache2/error_log”

Now if the directory apache2 does not exist in /private/var/log/, apache will fail to start without giving you much of an error message. To correct this, in terminal type:

sudo mkdir /private/var/log/apache2

Enter your admin password and restart apache either in System Preferences=>Sharing=>Web Sharing or in terminal by typing:

 sudo apachectl restart

Once this is done, enter your web address in the web browser and you should see your pages load. Hope this helps!

:, , ,

2 Comments for this entry

  • Andy

    THANK YOU SO MUCH! I tried so many things and I felt stupid but that was a pretty obscure error so I don’t feel so bad now

    • safety

      Glad that we could help you out! I wrestled with this one for quite some time one day before finding the issue. Let me know if you run into anymore problems and thanks for stopping by!

Leave a Reply

*

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...