New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSCache and CWP CageFS at no extra cost with all CWPpro licences. The LSCache plugin is integrated into our WordPress and other script installers, and CWP CageFS gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

Installing mod_security is not working on basic panel

Started by keremardicli, May 05, 2026, 09:45:15 AM

Previous topic - Next topic

keremardicli

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.

overseer

EL9 distro?
Quote from: Starburst on April 04, 2026, 03:53:17 PM
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: LoadFile /usr/lib64/

You need to edit it, so the whole line says: 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/