Apache wont restart after enabling mod_security on CWP Panel

httpd.service – Web server Apache
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; preset: disabled)
Active: failed (Result: exit-code) since Wed 2024-10-02 11:21:30 UTC; 9s ago
Duration: 7h 32min 47.783s
Process: 211481 ExecStart=/usr/local/apache/bin/apachectl start (code=exited, status=1/FAILURE)
CPU: 32ms

Oct 02 11:21:30 cloudtwo.coldriverdata.net systemd[1]: Starting Web server Apache…
Oct 02 11:21:30 cloudtwo.coldriverdata.net apachectl[211483]: httpd: Syntax error on line 512 of /usr/local/apache/conf/httpd.conf: Syntax error on line 2 of /usr/local/apache/conf.d/mod_security.conf: Cannot load /usr/lib64/ into server: /usr/lib64/: cannot read file data: Is a directory
Oct 02 11:21:30 cloudtwo.coldriverdata.net systemd[1]: httpd.service: Control process exited, code=exited, status=1/FAILURE
Oct 02 11:21:30 cloudtwo.coldriverdata.net systemd[1]: httpd.service: Failed with result ‘exit-code’.
Oct 02 11:21:30 cloudtwo.coldriverdata.net systemd[1]: Failed to start Web server Apache.

There seems to be a install problem.


nano /usr/local/apache/conf.d/mod_security.conf

Line 2 – Add – liblua-5.4.so to the end.


systemctl start httpd

Leave a Comment