Symptoms
When attempting to load a site, you encounter a 403 error, and /var/log/apache2/error_log contains an entry similar to the following.
CONFIG_TEXT: [INFO] [1225923] [T0] [CF429B-4#APVH_domain.tld:443] [ACL] Access to context [/] is denied!
Cause
The 403 error is caused by an incorrectly constructed Deny rule in the site's .htaccess file. Deny rules are frequently found in FilesMatch directives.
CONFIG_TEXT: <FilesMatch "\.(ico|pdf|flv|swf|js|mjs|css|gif|png|jpg|jpeg|txt|woff2|woff)$">
Order Allow,Deny
Deny from all
</FilesMatch>
Resolution
- Access the server's command line via SSH or Terminal in WHM or cPanel.
- Open the site's
.htaccessfile in your preferred text editor. -
Make any needed changes to the rules associated with the
Denyrule.Note: When using
Order Allow,Deny, theDeny from allrule will deny all traffic regardless ofAllowrules. -
Save the changes and exit the text editor.
Comments
0 comments
Article is closed for comments.