When accessing a site defined in my local dev environment, I can't seem to get past a 403 Forbidden error.
Under /etc/apache2/sites-available/ I have defined a file fun.local:
<VirtualHost *:80>
ServerName fun.local
DocumentRoot /home/noah/work/fun
ErrorLog /var/log/apache2/fun-error.log
<Directory /home/noah/work/fun>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
The the apache error log for the site contains this error:
[Sat Aug 21 13:34:34 2010] [crit] [client 127.0.0.1] (13)Permission denied: /home/noah/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
I am running apache2 and ubuntu 10.04.
Make sure to check the permissions on that directory. Realize that apache runs as the user 'www-data' and it will require read access to the files in that directory in order to function.
To check the permission run from the command line:
Note that Apache figures out if a directory is able to be served by checking the whole path for .htaccess files. This is in case there's a rule in /home/noah/.htaccess that says things should be denied, overriding the information setup in your virtualhost file.
Allowing the www-data user to read the directory should help. The other thing you can do is to symlink the /home/noah/work/fun directory into /var/www where the apache user should be the default owner.
Let me know if you need more details or if you can get there from here.
You can use apache userdir module to achieve this.
See this post for details: Apache symlinked to home directory - Permission Errors