Using Mod_Security to Protect Your Server (Page 1 of 4 )
Installation
You can get the mod_security packages using apt:
apt-get install libapache2-mod-securit y a2enmod mod-security /etc/init.d/apache2 force-reload
The file /etc/httpd/conf.d/mod_security.conf should now exist.
Basic configuration
mod_security.conf contains an example mod_security configuration. The example configuration has a lot of stuff in it that we may not need, so I recommend trimming the file down a bit and starting with the basics:
contains an example configuration. The example configuration has a lot of stuff in it that we may not need, so Irecommend trimming the file down a bit and starting with the basics:
<IfModule mod_security.c> # Turn the filtering engine On or Off SecFilterEngine On
# Make sure that URL encoding is valid SecFilterCheckURLEncoding On
# Unicode encoding check SecFilterCheckUnicodeEncoding Off
# Only allow bytes from this range SecFilterForceByteRange 0 255