Modsecurity stopped working after the transition from EasyApache3 to EasyApache4. The old EasyApache3 setup included Mod_ruid2 and the Mod_Security plugin.
When trying to install a ModSecurity Vendor (OWASP CRS V3.0) on the "WHM/ModSecurity Vendors" page, I get the following error message:
--------------
Error: The system experienced the following error when it attempted to install the “OWASP ModSecurity Core Rule Set V3.0” vendor: API failure: The system could not validate the new Apache configuration because httpd exited with a nonzero value. Apache produced the following error: AH00526: Syntax error on line 53 of /etc/apache2/conf.d/modsec/modsec2.cpanel.conf: SecRuleRemoveById requires at least one argument, rule ID for removal
--------------
When I inspect /etc/apache2/conf.d/modsec/modsec2.cpanel.conf the file is completely empty. There is no line 53.
I have tried using EasyApache4 to uninstall and reinstall ModSecurity but that made no difference. I believe the problem may be related to files or settings left over from the old ModSecurity plug-in install under easyapache3.
When trying to install a ModSecurity Vendor (OWASP CRS V3.0) on the "WHM/ModSecurity Vendors" page, I get the following error message:
--------------
Error: The system experienced the following error when it attempted to install the “OWASP ModSecurity Core Rule Set V3.0” vendor: API failure: The system could not validate the new Apache configuration because httpd exited with a nonzero value. Apache produced the following error: AH00526: Syntax error on line 53 of /etc/apache2/conf.d/modsec/modsec2.cpanel.conf: SecRuleRemoveById requires at least one argument, rule ID for removal
--------------
When I inspect /etc/apache2/conf.d/modsec/modsec2.cpanel.conf the file is completely empty. There is no line 53.
I have tried using EasyApache4 to uninstall and reinstall ModSecurity but that made no difference. I believe the problem may be related to files or settings left over from the old ModSecurity plug-in install under easyapache3.