Fresh install on AlmaLinux 8 does not install mod_security2

Started by adrianofnatal, July 31, 2026, 12:34:41 AM

Previous topic - Next topic

adrianofnatal

Hi!

Made a fresh install on AlmaLinux and cannot activate mod security.
The panel show that is installed but apache failed to start with error:

httpd: Syntax error on line 512 of /usr/local/apache/conf/httpd.conf: Syntax error on line 9 of /usr/local/apache/conf.d/mod_security.conf: Cannot load modules/mod_security2.so into server: /usr/local/apache/modules/mod_security2.so: cannot open shared object file: No such file or directory

The file mod_security2.so was not found in directory /usr/local/apache/modules.

Try to rebuild apache but no success.

How can I solve this problem?

Thanks!

Hi!

Reikor

Same problem here, just installed a cwpro and no modsecurity.

Need some fix.

adrianofnatal

Im notice that apache does not rebuild too. Maybe missing some package.


adrianofnatal

Problem solved with below actions:

1. There was update on CWP panel, just did the update.
2. Reboot the server.
3. Rebuild apache (using panel GUI) in the default version, 2.4.57. This time the rebuild was successfuly.
4. Uninstall previous attempt in mod security session of panel.
5. Reinstall mod security. The installation take more time than last tentative.

After instalation, mod_security2.so file was created on /usr/local/apache/modules and apache with modsecurity was working.