mod_security completely messed up beyond repair
Suddenly (I assume due to to cpanel automatic update), the complete mod_security configuration is gone and almost all related files are missing.
- ]
- When trying to save the configuration (Home "Security Center "ModSecurity" Configuration "Configure Global Directives) I get the message here: Error: The system could not save your ModSecurity" settings because of the following error: The system could not save some of the settings.
- The vendor management is corrupted as well (Home "Security Center "ModSecurity" Vendors "Manage Vendors) It shows OWASP "This vendor is not installed", when clicking on the "install" button, the only thing that happens is an error message: Error: The system experienced the following error when it attempted to install the "OWASP ModSecurity Core Rule Set" vendor: API failure: The system could not validate the new Apache configuration because httpd exited with a nonzero value. Apache produced the following error: httpd: Syntax error on line 219 of /etc/apache2/conf/httpd.conf: Syntax error on line 32mo of /etc/apache2/conf.d/modsec2.conf: Could not open configuration file /etc/apache2/conf.d/modsec/modsec2.user.conf: No such file or directory Line 219 in httpd.conf: Include "/etc/apache2/conf.d/*.conf" Line 32 in modec2.conf: Include /etc/apache2/conf.d/modsec/modsec2.cpanel.conf
- File /etc/apache2/conf.d/modsec/modsec2.user.conf exists but has a zero byte size
-
Please feel free to open a ticket directly to cPanel Technical Support about this for fastest resolution. 0 -
Hi. I have the same problem. I recently upgraded to Easy Apache 4 and now I get this-- Error:The system experienced the following error when it attempted to install the "OWASP ModSecurity Core Rule Set" vendor: API failure: The system could not validate the new Apache configuration because httpd exited with a nonzero value. Apache produced the following error: httpd: Syntax error on line 223 of /etc/apache2/conf/httpd.conf: Syntax error on line 32 of /etc/apache2/conf.d/modsec2.conf: Syntax error on line 28 of /etc/apache2/conf.d/modsec/modsec2.cpanel.conf: Could not open configuration file /etc/apache2/conf.d/modsec_vendor_configs/configserver/00_configserver.conf: No such file or directory Please help. What am I doing wrong? 0 -
Hello @Nathaniel Evans, To update, it looks like this issue was addressed via a support ticket with the following commands: # mkdir /etc/apache2/conf.d/modsec_vendor_configs/configserver # touch /etc/apache2/conf.d/modsec_vendor_configs/configserver/00_configserver.conf
Thank you.0
Please sign in to leave a comment.
Comments
3 comments