« | July 2025 | » | 日 | 一 | 二 | 三 | 四 | 五 | 六 | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | | | |
| 公告 |
戒除浮躁,读好书,交益友 |
Blog信息 |
blog名称:邢红瑞的blog 日志总数:523 评论数量:1142 留言数量:0 访问次数:9683136 建立时间:2004年12月20日 |

| |
[WAF]apache和modsecurity的安装 原创空间, 文章收藏, 软件技术, 电脑与网络
邢红瑞 发表于 2011/5/24 19:23:50 |
安装pcre安装apr http://labs.renren.com/apache-mirror//apr/apr-1.4.5.tar.gz ./configuremake make installapache的安装./configure --with-included-apr --with-php --with-mysql --with-susexec --disable-info --with-mpm=prefork --enable-so --enable-cgi --enable-rewrite --enable-ssl --enable-mime-magic --enable-unique-id --enable-mods-shared=all --enable-ssl=shared --enable-proxy --enable-proxy-connect --enable-proxy-ftp --enable-proxy-httpmakemake install注意 不要指定--prefix=/app/apache,否则出现error: cannot install `libaprutil-1.la' to a directory not ending in /usr/local/apache2/lib因为编译使用了shared modules,必须添加LoadModule authz_host_module modules/mod_authz_host.so,否则出现 Invalid command 'Order', perhaps misspelled or defined by a module not included in the server config
验证apxs安装/usr/local/apache2/bin/apxs -c -i
安装modsecurity来源位置: http://cdnetworks-kr-1.dl.sourceforge.net/project/mod-security/modsecurity-apache/2.6.0/modsecurity-apache_2.6.0.tar.gz ./configure --with-apxs=/usr/local/apache2/bin/apxs --with-pcre=/usr/local/bin/pcre-config --with-apr=/usr/local/apache2/bin/apr-1-config --with-apu=/usr/local/apache2/bin/apu-1-configmakemake install
创建目录modsecurity mkdir /usr/local/apache2/conf/modsecurity/修改httpd.conf加入LoadFile /usr/lib/libxml2.soLoadModule unique_id_module modules/mod_unique_id.soLoadModule security2_module modules/mod_security2.so |
|
|