Client Denied by Server Configuration: Apache Error
Trying to figure out what is going on
When you update Apache to a later version, the access control, especially the methods for authorizing and logging in, is often changed. Because of these changes, the “Client Denied by Server Configuration” mistake could happen. To find the right answer, you need to know what caused the error in the first place.
Resolving the Error
Follow the steps below to resolve the “Client Denied by Server Configuration” error:
Step 1: Locate the Configuration File
The first step is to find your Apache server’s setup file. The main configuration file is generally called httpd. conf and can be found in the Apache configuration directory.
Step 2: Update the code
Once you’ve found the httpd.conf file, open it in a text editor, and make the changes you need. Your setup file will tell you what changes you need to make based on the code that is already there.
Case 1: Let all of them through
If the below code is in your setup file:
Order allow,deny
Replace it with:
Require all granted
This change lets all requests go through and fixes the problem right away..
Case 2: Turn down every request
If the below code is in your setup file:
Order deny,allow
Replace it with:
Require all denied
By changing the code to “Require all denied,” you make sure that all requests are turned down.
Case 3: Reject all requests except for one specific host
If your setup file has the following lines of code:
Order Deny,Allow Deny from all Allow from example.com
Change it like this:
Require host example.com
This change only lets requests come from the address given, which in this case is “example.com”.
Step 3: Save and restart Apache again.
After making the needed changes to the configuration file, save the file and restart the Apache service for the changes to take effect. This step makes sure that the new settings are used, so the problem shouldn’t happen anymore.
Codeyo Genie is here to help, so don’t forget that. If you need more help or would rather have an expert show you the way. Contact us today to improve how your website works and make sure your users can always get to it.