I am trying to install mod_security on a server running Apache 2.4 - if I try and use:
yum install mod_security
it tells me Apache 2.2.15 is a dependency and won't install without this.
I then tried downloading mod_security and compiling it which eventually works but only after requiring httpd-devel due to a dependancy for APXS.
Due to needing to install httpd-devel, mod_security then gets installed for 2.2.15 and the modules do not appear to work with 2.4 - when I try to restart httpd I get an error:
Starting httpd: httpd: Syntax error on line 57 of /opt/httpd/conf/httpd.conf: Cannot load modules/mod_security2.so into server: /opt/httpd/modules/mod_security2.so: undefined symbol: ap_log_error
modules/mod_security2.so was copied manually from /etc/httpd/modules (Apache 2.2.15 directory).
Is there a specific install process for Apache 2.4 which does not require mixing things up by needing to install bits of 2.2?
mod_security
, but you are pretty much on your own with RHEL6/CentOS6 unless you find a third party repo to provide the package. Red Hat Software Collections provides Apache 2.4 for EL6, but does not providemod_security
. If you have a Red Hat subscription, you can also find a more detailed answer here: access.redhat.com/solutions/33595 – Stefan Lasiewski Aug 23 '16 at 20:51