MacOS – Localhost Forbidden

apachemacospermission

I've read many posts and articles on how to fix this but I'm at a loss as to why nothing I try is working!

I have a number of vhosts setup in my document root which are working fine but for some reason I can't get access to localhost itself, permissions look ok to me i.e. _www has full access to document root and all subfolders

Below is an excerpt from my https.conf:

DocumentRoot "/Users/cduve/sites"

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

<Directory "/Users/cduve/sites">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

And a screenshot of the finder info for "/Users/cduve/sites":

enter image description here

Best Answer

I managed to solve this by checking the error_log file using the tail -f command which included the following error:

[client 127.0.0.1] mod_hfs_apple: Mis-cased URI or unacceptable Unicode in URI: /users/cduve/sites/, wants: /Users/cduve/Sites/

The above error made me fix the case of the document root, the next error encountered was:internal server error so going back to the error_log:

[crit] [client ::1] configuration error: couldn't perform authentication. AuthType not set!: / 

Which was solved by commenting out Require all granted in https.conf

The original set up was on a MBP using the following steps.

The virtual host set up was done as per: http://www.coolestguidesontheplanet.com/downtown/how-set-virtual-hosts-apache-mac-osx-109-mavericks-and-osx-108-mountain-lion