WordFence firewall .htaccess optimization breaks Apache site
-
I went through the WordFence firewall .htaccess optimization step. When I was finished, I got this:
—
Internal Server Error
…
Apache/2.4.41 (Ubuntu) Server at [mydomain].com Port 80`
—Apache error log said:
/srv/www/wordpress/.htaccess: Require not allowed in <Files> context
So, in the .htaccess file I commented out one of the Require lines that WordFence had added, thusly:
<IfModule mod_authz_core.c>
# Require all denied
</IfModule>That resolved the issue, but did I weaken the firewall? Is there a more correct way to handle it? Also, should I have had to go through that pain or is there something you can do to help Apache users out and prevent that from happening? Or do I have something misconfigured?
Thanks,
SpencerWordPress 5.8.2
PHP 7.4.3 (cli) (built: Oct 25 2021 18:20:54) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies
ubuntu 20.04
- The topic ‘WordFence firewall .htaccess optimization breaks Apache site’ is closed to new replies.