installing mod_security


Verified User
Hi All,

I've spent around the last 5 hours looking around for guides to install mod_security but for one reason or another it never works out.

Does anyone have an up-to-date guide for installing mod_security on a server with the following:

Centos5 i386

Thanks in advance.


Verified User

No that's not my problem. The problem seems to be that there's no definitive way and all the ways I've tried do not seem to load it.

I've seen that script but don't want to use it because there's no clear instructions how to use it and it appears I would be also installing lots of other things I don't use or need.


Verified User
Update -

Didn't realise you can use the script to just install/update packages individually, so used it to install mod_security and mod_security rules for apache2.

Also added the additional code to: httpd-includes.conf and restarted apache.

However even though it reports no errors it's not listed under:
httpd -l
php -m
or in phpinfo.php

back to square 1!


New member
like this

you have same my proplem

take my anser

LoadFile /usr/lib/
LoadModule security2_module     /usr/lib/apache/
<IfModule mod_security2.c>
# ModSecurity2 ONLY
# Do not change anything in included files
Include /etc/modsecurity2/*.conf

firist dowenlod mod and roule from the script

and but in

/etc/httpd/conf/extra/httpd-includes.conf ;)


Verified User
Hi bo0obo0o,

I already tried adding that to /etc/httpd/conf/extra/httpd-includes.conf

I also changed:
LoadFile /usr/lib/
LoadFile /usr/lib/

As it appears you have done.

But this still didn't load it.

It actually caused a problem as my ticket support system gave me an error after I loaded

The error was:
[Warning]: simplexmp_load_string() [function.simplexml-load-string]: Entity: line 12: parse error: Extra content at the end of the document (LoginShare/class.SWIFT_LoginShareUser.php:113

I put everythign back after that as it appeared I was doing more damage than good.