- 论坛徽章:
- 0
|
1 下载modsecurity-apache_2.5.11.tar.gz并解压
手册地址
http://www.modsecurity.org/documentation/
安装参照手册, 需要其他一些软件包的安装, 其中其他博客文章特别提到了这个软件包的安装
(
到http://www.pcre.org/下载pcre-7.9.tar.gz,传到root目录下解压,解压缩,进入编译
./configure
make
make install
)
下载地址
http://www.modsecurity.org/download/
2 xampp要安装开发包[color="#990000"]xampp-linux-devel-1.7.1.tar.gz
解压方式tar xvfz xampp-linux-devel-1.7.2.tar.gz -C /opt
3 进入/root/modsecurity-apache_2.5.9/apache2
[color="#990000"]./configure --with-apxs=/opt/lampp/bin/apxs --with-apr=/opt/lampp/bin/apr-1-config --with-apu=/opt/lampp/bin/apu-1-config
make
make install
会提示/opt/lampp/modules/mod_security2.so安装成功!
4 将/root/modsecurity-apache_2.5.9/rules/下所有.conf文件拷贝到/opt/lampp/etc/modsecurity/下,先建立modsecurity目录
5 编辑/opt/lampp/etc/httpd.conf
打开 LoadModule unique_id_module modules/mod_unique_id.so
在modules段的最下面加入
LoadModule security2_module modules/mod_security2.so
在最下面加入
Include conf/modsecurity/*.conf
Include conf/modsecurity/base_rules/*conf
6 重启apache /opt/lampp/lampp reloadapache,这是应该看见/opt/lampp/logs下面有modsec_audit.log和modsec_debug.log两个文件
本文参考了网上的其他博文, 对其做了修改
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/106124/showart_2097540.html |
|