Subscribe

Menu


Modsecurity On Centos 4.7 64 Bit Architecture

By Ian Scott

Some might have a problem installing Mod Security on Centos 4.7 and 64 bit architectures, if following the instructions on the Modsecurity website.

My webserver has been upgraded to  httpd-2.0.52-41 using the CentosPlus repository.  I don’t know if others using versions previous to this will have the same problem or not - but it has to with one of mod_security’s requirements: mod_unique_id.

It could be the result of an older httpd.conf file being used in place of the one that might come with a brand new install of Centos and Apache, but my configuration file did not have the module loaded.  I had to manually add the following to my httpd.conf file:

LoadModule unique_id_module modules/mod_unique_id.so

Another requirement of mod_security is libxml2.  The official documentation at modsecurity.org tells you to add the following line to your httpd.conf file:

LoadFile /usr/lib/libxml2.so

If you are on a 64 bit system, it is likely however that this path is incorrect.  What you need to add to your httpd.conf file is this:

LoadFile /usr/lib64/libxml2.so

Hopefully this will help anyone who may be having trouble with installing Mod Security on their webserver. I didn’t even realize that the mod_unique_id module was not loaded until I happened to check the /var/log/httpd/error_log file and noticed lines of something like “mod security requires mod_unique_id.”  When I restarted httpd, there was no error message and thought everything was working as it should.

Read more in: Computer Security, Firewalls |