Issue
The “/usr/sbin/httpd -DSSL -t -f /etc/apache2/conf/httpd.conf -C Include "/etc/apache2/conf.modules.d/*.conf"” command (process 19703) reported error number 1 when it ended. httpd_ls_bak: Syntax error on line 274 of /etc/apache2/conf/httpd.conf: Syntax error on line 33 of /etc/apache2/conf.d/modsec2.conf: Syntax error on line 29 of /etc/apache2/conf.d/modsec/modsec2.cpanel.conf: Could not open configuration file /etc/apache2/conf.d/modsec_vendor_configs/imunify360-full-litespeed/001_i360_1_infectors.conf: No such file or directory
Environment
- Imunify360 WAF Ruleset
Solution
For some reason, one conf file was named with an incorrect name and renaming it helped to solve the issue:
1. Open with the editor the ModSecurity cPanel configuration file:
# nano /etc/apache2/conf.d/modsec/modsec2.cpanel.conf
2.1. Find the following string:
Include "/etc/apache2/conf.d/modsec_vendor_configs/imunify360-full-apache/001_i360_1_infectors.conf
2.2. The include directives should use the name of the file 011_i360_1_infectors.conf instead 001. Edit it as follows:
Include "/etc/apache2/conf.d/modsec_vendor_configs/imunify360-full-apache/011_i360_1_infectors.conf
2.3. Save changes.
3. Check Apache`s configs:
# apachectl configtest
4. If no error is shown, remove the current vendors:
/usr/local/cpanel/scripts/modsec_vendor remove imunify360-full-litespeed
5.1. Install Imunify360 WAF again:
imunify360-agent install-vendors
5.2. Then check if any errors still persist:
# apachectl configtest
5.3. Use the following to verify the Imunify360 WAF ruleset has been installed and enabled:
# /usr/local/cpanel/scripts/modsec_vendor list
Useful links
https://docs.cpanel.net/whm/security-center/modsecurity-configuration
Comments
0 comments
Please sign in to leave a comment.