CentOS 7 Apache Error AH01630: client denied by server configuration

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 admin@Hostonnet.com
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 admin@Hostonnet.com
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

  • Martin Raaflaub

    Hello, I have exactly the same probleme, not being able to get Apache running due to the error “AH01630: client denied by server configuration”. However, all the info provided here is not useful to me, as I don’t even know what is the Virtual Host and where I find it. Is there any chance that I get Xampp running without taking a course in Linux programming?

  • I never used XAMPP. On which folder you place your web site files ? You will need to find the apache configuration file, mostly the file name will be httpd.conf and need to edit the file. If you can pastebin content of the file, i may able to help. It will better ask XAMPP community forum, they will be able to help you better.

  • Martin Raaflaub

    Hi, thanks for replying. No, repairing the apache configuration file sounds more difficult than to extract the blind gut with the only help of a manual. i’ll delete and reinstall or forget about it.

  • rddro

    I added it to no avail still the logs is filled with AH01630: what’s curious is that they report the wrong path.
    AH01630: client denied by server configuration: /opt/bitnami/apache2/htdocs/api, referer: < this one should be /opt/bitnami/apps//api

    though the configuration is loaded from /opt/bitnami/apps//conf

  • Thanks ! You really help me to find the problem.

  • Erik Roest

    Thanks as well, really saved the day for me!