I have this weird issue with my website backups. When I store them inside my Sites folder and try to view them from the browser.
1. They do not appear listed when I do a directory listing
2. Accessing the folder manually produces the error
You don’t have permission to access on localhost /~username/mydirectory
This is well known and documented on Apple here.
But my issue is it is only a problem for this backups, the existing directories I have in my system works fine.
The solution is not straightforward but this works.
Follow the solution from Apple website. edit your username.conf file using terminal and then add the following line before closing.
Options +FollowSymLinks
So it looks like this.
<Directory “/Users/username/Sites/”>Options Indexes MultiViewsAllowOverride AllOrder allow,denyAllow from allOptions +FollowSymLinks</Directory>
Then restart apache
service apachectl restart