My virtual host configuation file contains the following (Apache version is 2.4.7):

<VirtualHost _default_:443>
    <Directory [...]>
        Require all granted

If I want to access the directory the server returns a 403 error and the apache logs contain

[access_compat:error] [pid 3433] [client [...]] AH01797: client denied by server configuration

And if I swap "Require all granted" with

Order allow,deny
Allow from all

the line it the log file changes to

[authz_core:error] [pid 4970] [client [...]] AH01630: client denied by server configuration

How can I further investigate what is going wrong? And why is authz_core active when using the old directives and access_compat when using the new ones?

EDIT: Output of apachectl -M: http://pastebin.com/YxvNtAZr

  • What does apachectl -M give you?
    – Colt
    May 21, 2016 at 12:30
  • I updated the post. May 21, 2016 at 12:47
  • Try removing the access_compat module, while using the correct Require all granted directive
    – Colt
    May 21, 2016 at 14:32
  • I already tried this, but unfortunately the php5 module from the Ubuntu Server 14.04 Repos (update is not possible) still uses the old syntax. (edit: typo) May 21, 2016 at 15:41
  • All you have to do is edit the <FilesMatch ".+\.phps$"> and <FilesMatch "^\.ph(p[345]?|t|tml|ps)$"> blocks in the php5.conf file to delete the Order Deny,Allow and Deny from all directives, replacing them with Require all denied. The Apache documentation warns repeatedly against mixing old and new access control directives, stating that "unpredictable results" will happen.
    – Colt
    May 21, 2016 at 15:51

1 Answer 1


Found the problem ... there was a enabled config file which overwrote the access rules for this particular directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.