![]() |
|
|
#1
|
||||
|
||||
|
Note:ModSecurity 2.x works with Apache 2.0.x or better. It is assumed here that you are using a red hat or fedora OS in this article. Check to see if you have libxml2 installed Code:
rpm -q libxml2 Code:
httpd-devel apr-devel apr-util-devel pcre-devel Code:
wget ftp://xmlsoft.org/libxml2/libxml2-2.6.27-1.i386.rpm rpm -Uvh libxml2-2.6.27-1.i386.rpm Code:
wget http://www.modsecurity.org/download/modsecurity-apache_2.1.1.tar.gz tar zxf modsecurity-apache_2.1.1.tar.gz For FC4 its most likely Code:
top_dir = /etc/httpd Code:
top_dir = /usr/lib/httpd Compile with make Stop Apache Install with make install now go to your httpd.conf file, typically located at /etc/httpd/conf/ Code:
nano -w /etc/httpd/conf/httpd.conf Above all of the LoadModule directives add Code:
LoadFile /usr/lib/libxml2.so Code:
LoadModule security2_module modules/mod_security2.so Include conf/modsecurity/*.conf Code:
mkdir /etc/httpd/conf/modsecurity;cd /etc/httpd/conf/modsecurity wget http://www.modsecurity.org/download/modsecurity-core-rules_2.1-1.4.tar.gz tar zxf modsecurity-core-rules_2.1-1.4.tar.gz rm -f modsecurity-core-rules_2.1-1.4.tar.gz restart apache - it will fail to stop, thats fine. Code:
/sbin/service httpd restart Code:
rpm -e httpd-devel rpm -e apr-util-devel rpm -e apr-devel rpm -e pcre-devel |
![]() |
| Thread Tools | |
| Rate This Thread | |
|
|