Apache Directory permissions

I just got caught out with apache directory permissions while installing gallery for a virtual host. I previously had all the virtual hosts using the same strict directory permissions shown below:

        <Directory /sites/<domain>/www/htdocs>
                AllowOverride AuthConfig
        </Directory>

This will generate 2 errors in the virtual host error log, the first of which is a php error:

[alert]  /sites/<domain>/www/htdocs/gallery/setup/.htaccess: php_value not allowed here

This can be fixed by adding the Options option to the AllowOverride statement, the second error:

[alert]  /sites/<domain>/www/htdocs/gallery/setup/.htaccess: RewriteEngine not allowed here

can be fixed by adding the FileInfo option. So the final directory block should look like this:

        <Directory /sites/<domain>/www/htdocs>
                AllowOverride AuthConfig Options FileInfo
        </Directory>

3 Comments

  1. Eric Barr says:

    This problem has been driving me nuts all night and I finally stumbled upon this really “useful thing” via a google search. This was very clear and solved my issues, thanks!

  2. Tony Yu says:

    Thanks, this problem drives me to crazy as well. It has been solved.

  3. Singh says:

    Serious Thanx!

    This thing’s been making me crazy with getting the Zend Framework to work with Apache.

    Simple FiX!

    Thanx! ^_^

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>