There are times when you may see this error in your relevant error log file(s).

[Sat Jun 12 17:51:16.015677 2021] [:error] [pid 3480:tid 47508520802048] [client 703.190.078.134:60738] client denied by server configuration: /home/$doggie/public_html/filename/

This error simply means that the access to the directory on the file system was denied by a configuration either at a system level or hosting account level.

Before attempting to sort this issue out, take note of:

  • the full file system path for which access is being denied, and
  • the IP or hostname of the client as using the correct path in the directory block

for the following examples is essential to solving this problem.

Also, remember that "Directory" permissions propagate to sub-directories by default.

One of the possible causes for access denied may be due to an explicit deny (2.2) directive or require (2.4) directive in a directory block or .htaccess file.

Apache 2.4 release introduced significant changes to the authorization and authentication process.

Users of that release are encouraged to read this link to migrate their older config files.

We often see where a plugin or a customer adds a mix of allow (2.2) and require (2.4) directives while using apache HTTPD 2.4, used in the same or separate directory blocks.

The new 2.4 directives should be used exclusively.

In the examples below, using the following configuration may resolve the issue:

 

FROM Apache 2.2:

  Order deny,allow
  Deny from all

TO Apache 2.4:

  Require all denied

FROM Apache 2.2:

  Order allow,deny
  Allow from all

TO Apache 2.4:

  Require all granted

 

If you want to block an IP and you know the specific IP address, you can use something like:

    Require all granted
    Require not ip 123.456.78.165

Anyone from (123.456.78.165) will not be able to see the content covered by this directive.

If you don't know the IP address, but know the domain you can use:

Require not host $badDomain.com

 

option 1:

  • if restricting any part of your website or application, make sure your IP address is properly added to any relative "allow" list
  • rename and save the htaccess file as htaccess.txt
  • visit Software >>> MultiPHP Manager, select the appropriate PHP version and save
  • visit Software >>> MultiPHP Editor or Select PHP Version, select the directory, check PHP values (including the session.save_path) and save.

This will recreate the .htaccess file with default settings

Our hosting platform has robust security and adding additional security plugins (especially WordPress) can cause more harm than good if not properly tested.

 

option 2:

  • if restricting any part of your website or application, make sure your IP address is properly added to any relative "allow" list<
  • disable any security plugin adding directives to the htaccess file
  • visually inspect the htaccess file to identify the specific rules that are incompatible with Apache 2.4/5 and remove them. Altering or commenting out the offending directives from that module will resolve the issue.
  • save the .htaccess file with default settings

If granting full access to the resource in question is not an option, specific IP addresses, partial IP addresses, network masks, and CIDR specifications can be used with the allow and require directives.

Bu cevap yeterince yardımcı oldu mu? 1 Bu dökümanı faydalı bulan kullanıcılar: (2 Oy)