- Plesk Onyx for Linux
Unable to activate ModSecurity at Tools & Settings > Web Application Firewall (ModSecurity): Apache service goes down and the command "httpd -t" starts to return a similar to the below error message:
# httpd -t
httpd: Syntax error on line 353 of /etc/httpd/conf/httpd.conf: Syntax error on line 5 of /etc/httpd/conf.d/security2.conf: Syntax error on line 6 of /etc/httpd/conf/modsecurity.d/zz_rules.conf: No matches for the wildcard '*.conf' in '/etc/httpd/conf/modsecurity.d/rules/modsecurity_crs-plesk', failing (use IncludeOptional if required)
The ModSecurity configuration file /etc/httpd/conf/modsecurity.d/zz_rules.conf contains links to non-existent files.
Connect to the Plesk server via SSH.
Open the file /etc/httpd/conf/modsecurity.d/zz_rules.conf in a text editor and replace all "Include" with "IncludeOptional". Save the changes.
# service httpd start
- In Plesk, go to Tools & Settings > Web Application Firewall (ModSecurity) and activate ModSecurity.