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
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

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.