Author Topic: Installing mod_security is not working on basic panel  (Read 82 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Installing mod_security is not working on basic panel
« on: May 05, 2026, 09:45:15 AM »
I tried to enable mod_security after some breach. Opened up security > mod_security and clicked on install.

After it succesfully installed mod_security Apache did not start at all.

After some research i found out that mod_security2.so file is not being installed in the httpd directory.

With the help of AI, I simlinked so file but this time CWP Dashboard controlled Apache did not work. We had to switch to /usr/local/apache/bin/apachectl . But CWP is monitoring httpd.service which is not the same. it shows Apache is not running and trying to run it wont work as part 80 is already being used. If i stop apachectl then mod_security does not work.

Offline
*****
Re: Installing mod_security is not working on basic panel
« Reply #1 on: May 05, 2026, 03:38:37 PM »
EL9 distro?
For some reason when you install ModSecurity, line 2 of /usr/local/apache/conf.d/mod_security.conf needs to be manually fixed.

By Default is only has:
Code: [Select]
LoadFile /usr/lib64/
You need to edit it, so the whole line says:
Code: [Select]
LoadFile /usr/lib64/liblua-5.4.so
Save, and then start Apache.
While you're at it, consider updating Mod Security and using the latest OWASP ruleset:
https://starburst.help/control-web-panel-cwp/modsecurity-running-with-control-web-panel/update-modsecurity-to-2-9-12-running-cwp-and-apache-on-almalinux-9/
https://starburst.help/control-web-panel-cwp/modsecurity-running-with-control-web-panel/update-owasp-crs-ruleset-to-4-25-0-lts-running-cwp-and-apache-on-almalinux-9/