Igor Moiseev Applied mathematician, Web Developer

Apache2: AH01630: client denied by server configurationedit

The Apache web server of the version 2.4 introduces a new style for <VirtualHost> configuration, in particular the <Directory> syntax is not compatible anymore with the previous one 2.2.

The old styled configuration valid in the Apache <= 2.2 version

<VirtualHost *:80>

    ...

    <Directory "/var/www/html/example.com/public">
        Options MultiViews FollowSymLinks
        AllowOverride all
        Order allow,deny
        Allow from all
    </Directory>

    ...

</VirtualHost>

the modification is introduced in the part

Order allow,deny
Allow from all

the new way to describe the access permitions is reduced to just one line

Require all granted

finally the correct <VirtualHost> configuration will look like the following

<VirtualHost *:80>
    ServerName  www.example.com
    ServerAlias example.com

    DirectoryIndex index.html index.php index.htm
    DocumentRoot /var/www/html/example.com/public

    <Directory "/var/www/html/example.com/public">
        Options MultiViews FollowSymLinks
        AllowOverride all
        Require all granted
    </Directory>

    # Logfiles
    ErrorLog  /var/log/apache2/example.com/error.log
    CustomLog /var/log/apache2/example.com/access.log combined
</VirtualHost>