I am trying to run a project on the Apache Server. I am running the server as a virtual host on my computer. But, I am facing a problem. The system shows a message saying, Apache error client denied by server configuration. What should I do?
How To Solve The Apache Error Client Denied By Server Configuration In Windows?
The error can only occur if the client address of your server is same as,::1 or 127.0.0.1 or 127.0.0.8. To solve this problem, you can update the Apache drivers and the software. After upgrading to Apache 2.4 or higher version, you won’t get the error.
You can also check your directory tag from the project. Modify your directory tag in the XML configuration settings page from ‘Allow from All’ to ‘Require Local.’
This setting should work.
How To Solve The Apache Error Client Denied By Server Configuration In Windows?
If you receive “Client denied by server configuration,” it means the access to the directory on the file system was denied by an Apache configuration. There are two possible causes to this problem:
- Access was denied due to an explicit deny (2.2) directive
- Require (2.4) directive in a directory block or .htaccess file
2.2 directive:
<Directory /var/www/example.com>
Order deny,allow
Deny from all
</Directory>
2.4 directive:
<Directory /var/www/example.com>
Require all denied
</Directory>
For example, a local machine is being denied access to “/var/www/example.com.” In this case, the following configurations will fix the problem:
2.2 directive:
<Directory /var/www/example.com>
Order allow,deny
Allow from all
</Directory>
2.4 directive:
<Directory /var/www/example.com>
Require all granted
</Directory>