Client denied by server configuration apache 2.4

Date Posted: 12-10-2017

The following error we have seen on the following log after we setup apache server on linux host.

Client denied by server configuration apache 2.4

Reason:

This error normally occurs if the documentroot is not allowed on virtualhost configuration. Consider, if the documentroot /home/domain/public_html and by default this path will not be allowed on apache configuration.

Resolution:

To fix the issue, we need to allow the path /home/domain/public_html  on apache configuration. Let’s assume that the configuration file is /etc/apache2/sites-enabled/domain.conf

vi /etc/apache2/sites-enabled/domain.conf

<Directory "/home/domain/public_html">
Require all granted
</Directory>

Verify the syntax of apache2 configuration.

apachectl -t

Restart the apache service

service apache2 restart

 

Leave a Reply