Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AllowOverride for .htaccess on local machine giving 403 Forbidden

I have a mod_rewrite I'd like to use locally on my mac but when I change my configuration to in my directory tag I get a 403 Forbidden error. I've tried all the other solutions around but no luck.

Maybe somebody will see something I am not...

Here is the code:

httpd.conf

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

<Directory "/Library/WebServer/Documents/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

Which is overridden by myusername.conf

<Directory /Users/adrianmaurer/Sites/www>
    Options Indexes MultiViews FollowSymLinks ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

Virtual host file httpd-vhosts.conf

<VirtualHost *:80>
DocumentRoot /Library/WebServer/Documents
ServerName localhost
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot /Users/adrianmaurer/Sites/www
    ServerName myserver.dev
</VirtualHost>
like image 606
Adgezaza Avatar asked Apr 20 '11 21:04

Adgezaza


1 Answers

I was able to get it fixed by setting my /etc/apache2/users/username.conf file like so (Note you have to change the Options line too, not just the AllowOverride):

<Directory "/Users/tlhunter/Sites/">
    Options All               
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
like image 192
Thomas Hunter II Avatar answered Sep 20 '22 04:09

Thomas Hunter II