On my MacBook (10.5.latest), I turned on "Web sharing" in the control panel. The built-in firewall is turned off. I have an index.html in my ~/name/Sites/ folder. It's publicly readable (a+r). I can view it in Safari (or any other browser) if I open it as a file.

If I go to (or without index.html, or with any other file from that folder), I get a page which says simply:

404 - Not Found

What am I missing? And how do I go about troubleshooting this -- where are the logs?

  • The logs are in /var/log or /var/log/apache2, access_log and error_log are of interest. – nohillside Mar 18 '12 at 14:25

For some reason Apple disabled personal web sharing from your ~/username/Sites folder in Mac OS X 10.5. To turn it back on, edit /private/etc/apache2/httpd.conf and look for the following:

# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
# First, we configure the "default" to be a very restrictive set of
# features.
<Directory />
    Options FollowSymLinks
    AllowOverride All
    Order deny,allow
    Deny from all

Change Deny from all to Allow from all. Then go into your Sharing preferences and disable/re-enable web sharing and it should work.

  • Found it, changed it, restarted it, still get the 404. :-( I was going to be shocked if this was the case, since the control panel says "Your personal website:". – user1560 Nov 8 '10 at 16:58
  • Also, I'm pretty sure I've used personal web sharing on 10.5 here before, and /private/var/log/apache2/access_log shows a few successful (200) hits to files under ~/name/ in 2008. – user1560 Nov 8 '10 at 17:00
  • @Ken Are you using your full username? The "/~username/" in the URL is your "short" username. If that's not it I'm not sure what's wrong. – Kyle Cronin Nov 8 '10 at 17:01
  • could it be a permissions error? I think it's a different error code for permissions errors but make your index.html permissions are at least 644 – Robert S Ciaccio Nov 8 '10 at 17:03
  • It's the 'short' name (Unix login name, same as the control panel says to use, same as the access logs said I used in 2008). My index.html is already 644 (that's rw/r/r, IIRC). – user1560 Nov 8 '10 at 17:07

Although I'm not sure if the origins of the problem were same, I faced the exact scenario as you described, and I made the "Your personal website:" provided in System Preferences panel work by uninstalling Pow, a Rack server.

You must log in to answer this question.