Are you looking for a solution to ‘apache error client denied by server configuration’? We can help you fix it.
Here at Bobcares, we have seen several such apache related errors as part of our Server Management Services for web hosts and online service providers.
Today we’ll take a look at the causes for this error and see how to fix it.
What causes apache error client denied by server configuration to occur
Before we get into the solution part, let us first see what causes this error to occur.
Usually, you receive this error after upgrading the Apache to a higher version.
This error specifies that the access to the directory on the file system was denied by an Apache configuration.
It is because, in the upgraded version of Apache, there are some changes in the access control that is in the authorization and authentication process. So as a result, apache throws this error.
How we fix apache error client denied by server configuration
One of our customers approached us with the same error message
client denied by server configuration: /var/www/example.com/
Now, let’s see how our Support Engineers fix this error.
We checked the httpd.conf file in the server and made the below changes to fix the error.
We updated the below code
<Directory /var/www/example.com>
Order allow,deny
Allow from all
</Directory>
to
<Directory /var/www/example.com>
Require all granted
</Directory>
Here, all the requests were allowed. So we updated it as Require all granted
This fixed the error immediately.
However, if you have the below code in your configuration file where you are denying all the requests.
<Directory /var/www/example.com>
Order deny,allow
Deny from all
</Directory>
then update it to
<Directory /var/www/example.com>
Require all denied
</Directory>
In case, if you have the below code
<Directory /var/www/example.com>
Order Deny,Allow
Deny from all
Allow from example.com
</Directory>
Then update it to
<Directory /var/www/example.com>
Require host example.com
</Directory>
Hence, if you have upgraded the Apache version then remove “Order deny,allow”, “Order allow,deny”, and related lines from the configuration files.
Make sure to replace “Deny from all” code to “Require all denied” and “Allow from all” to “Require all granted”.
In case, if you are allowing any specific hostname then make changes according to it. For instance, update it to “Require host IP_address” or “Require host domain.com”
[Need any further assistance in fixing Apache errors? – We are here to help you.]
Conclusion
In short, this error occurs after upgrading the Apache version. Today, we saw the solution provided by our Support Engineers to this error.
0 Comments