AH01797: client denied by server configuration in cPanel

Whenever we attempt to browse a website, a 403 forbidden error appears. Additionally, we can see a similar issue to “AH01797: client denied by server configuration” in the website error logs. Include the below code to .htaccess file and prevent the IP address from accessing the website.

<Directory "/">
    Order allow,deny
    Deny from all
</Directory>

In this case, we should edit the .htaccess file and remove the code which is blocking the IP address or all IP addresses from accessing the website.

Methods To Fix “AH01797: client denied by server configuration” in cPanel?

We should know certain details before fixing the error “AH01797: client denied by server configuration” in cPanel. It includes the complete file system path where access is not possible, and the IP or hostname of the client as using the correct path in the directory block.

Method 1: In this method, we must confirm the IP address is properly added to any relative “allow” list before restricting any part of the website or application. We should also rename and save the htaccess file as htaccess.txt. Then save the correct PHP version by visiting Software >>> MultiPHP Manager. Also, visit Software >>> MultiPHP Editor or Select PHP Version, select the directory and check PHP values and save it. By doing this, we can create the.htaccess file with its default values.

Method 2: Here, we must confirm to properly include the IP address to any relative “allow” list before restricting any part of the website or application. Then disable any security plugins that add htaccess file directives. After that visually examining the htaccess file to locate and eliminate any rules that are incompatible with server. Fixing of the problem is possible by editing or commenting out the problematic directives in that module. Finally, save the .htaccess file with default settings.

 [Looking for an answer to a different question? Contact US]

Add comment