Apache Error Client Denied By Server Configuration
When we get “client denied by server configuration” error first thing in our mind comes that how we fix the error? By default Apache will not allow end users to do anything on default DocumentRoot. To fix this issue you need to make some changes in the Apache Configuration file.

On Apache 2.4.3 Web Server under CentOS Linux a new security feature added that often results in error. If you will see the Apache log message then you will get an error “client denied by server configuration”. The feature is requiring an authorized user identity to access a directory.
# vim /etc/httpd/conf/httpd.conf
Default Configuration:
<Directory "/path/of/DocumentRoot">
Options -Indexes FollowSymLinks
AllowOverride AuthConfig
Order deny, allow
Deny from all
</Directory>
New Configuration:
<Directory "/path/of/DocumentRoot">
Options -Indexes FollowSymLinks
AllowOverride AuthConfig
Order allow, deny
Allow from all
</Directory>
If you are using multiple virtual host then add above line in your virtual host. At the end it should look like as follows:
<VirtualHost *:80>
ServerAdmin dennis.r@techoism.com
DocumentRoot /home/techoism/virtual-one
ServerName virtual.techoism.com
ErrorLog logs/virtual.techoism.com-error_log
CustomLog logs/virtual.techoism.com-access_log common
<Directory "/home/techoism/public_html">
Options -Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
After all the changes first check your configuration using below command:
# httpd -t
Output:
Syntax OK You have new mail in /var/spool/mail/root
Now restart the Apache Web Service to reflact the changes.
For CentOS/RHEL 7: # systemctl restart httpd For CentOS/RHEL 5/6: # service httpd restart
See Also:
Enjoy it!