Apache Error: AllowOverride not allowed here


Problem: Trying to allow .htaccess file use on a single virtual host, adding the line "AllowOverride FileInfo" in the VirtualHost block, but the error we get back is:

    # service httpd configtest
    Syntax error on line NNNN of /etc/httpd/conf/httpd.conf:
    AllowOverride not allowed here

Solution: AllowOverride doesn't belong in the VirtualHost block. It belongs in a Directory block. Add a Directory block right before the VirtualHost block and put the AllowOverride directive there instead.


keywords: httpd
date: 06/22/2005