HostOnNet Blog

CentOS 7 Apache Error AH01630: client denied by server configuration

Looking for Linux Server Admin or WordPress Expert? We can help.

I have setup a web site on CentOS 7 Apache server. With following configuration.

<VirtualHost 127.0.0.1:80>
DocumentRoot /home/hostonnet.in/public
ServerName hostonnet.in
ServerAdmin [email protected]
CustomLog /var/log/httpd/hostonnet.in.log combined
<Directory "/home/hostonnet.in/public/">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

When i visit the web site i get permission denied error. On checking apache error log, i found

Thu Aug 28 04:22:58.645981 2014] [authz_core:error] [pid 1149] [client 59.98.136.70:35550] AH01630: client denied by server configuration: /home/hostonnet.in/public/
[Thu Aug 28 04:23:31.460111 2014] [authz_core:error] [pid 1151] [client 59.98.136.70:35568] AH01630: client denied by server configuration: /home/hostonnet.in/public/index.html

This is because CentOS 7 use Apache 2.4 and it need “Require all granted” specified in VirtualHost entry.

http://httpd.apache.org/docs/2.4/upgrading.html

To fix, add

Require all granted

In Directory section of VirtualHost, updated VirtualHost configuration is

<VirtualHost 127.0.0.1:80>
DocumentRoot /home/hostonnet.in/public
ServerName hostonnet.in
ServerAdmin [email protected]
CustomLog /var/log/httpd/hostonnet.in.log combined
<Directory "/home/hostonnet.in/public/">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>

Now restart Apache

systemctl restart httpd

Posted in Linux

6 Responses to CentOS 7 Apache Error AH01630: client denied by server configuration

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.