Jump to content

[SOLVED] 403 error and .htaccess


littlevisuals

Recommended Posts

Hi, having a real problem here with Apache.  I have activated it locally and works fine, but when I set up a Virtual Host it gives me a 403 forbidden error?

 

Im using Mac OS X with the zend framework. 

 

I know its got to do with permissions but i've changed them all using the wonderful 'BatChmod' application.  It used to give a 500 error when I typed something random to see if it saw the file.  Now all I get is the 403 forbidden error?

 

Any thoughts?

Link to comment
https://forums.phpfreaks.com/topic/170443-solved-403-error-and-htaccess/
Share on other sites

After many hours Ive solved the problem. If anyone wants to know here is the solution.

 

The 403 errors have to do with permissions , which threw me off the ball a bit.  The actual issue was with the .htaccess file having the rewriteEngine on , which went back to apache and 403'd.

 

I had this in my config

 

<Directory "/Users/username/Sites/mywebsite/public">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

 

By changing

 

AllowOverride None

to

 

AllowOverride All

 

I got the 403 so I added the line

 

Options +Indexes +FollowSymLinks +ExecCGI

 

and low and behold it worked.  Its a tricky one as the errors threw me on a wild goose chase.

 

Anyways the final code looked like this

 

<Directory "/Users/username/Sites/mywebsite/public">
Options Indexes MultiViews
Options +Indexes +FollowSymLinks +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>

 

Hope this can save someone the time I wasted in future!  :D

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.