ModSecurity+nginx配置详细

参考github上的文档,直接clone

[root@localhost source]# git clone --recursive https://github.com/owasp-modsecurity/ModSecurity ModSecurity
或者 git clone https://github.com/SpiderLabs/ModSecurity

[root@localhost modsecurity]# cd ModSecurity/

[root@localhost ModSecurity]# git submodule init
[root@localhost ModSecurity]# git submodule update
[root@localhost ModSecurity]# ./build.sh
[root@localhost ModSecurity]# ./configure
[root@localhost ModSecurity]# make
[root@localhost ModSecurity]# make install
[root@localhost ModSecurity]# ls /usr/local/modsecurity/
bin  include  lib
[root@localhost ModSecurity]# ls /usr/local/modsecurity/bin/
modsec-rules-check

安装nginx的插件/安装nginx

[root@localhost modsecurity]# git clone https://github.com/owasp-modsecurity/ModSecurity-nginx.git

[root@localhost modsecurity]# mv ModSecurity-nginx/ /opt/soft/

[root@localhost nginx-1.6.1]# ./configure –prefix=/opt/soft/nginx-1.26.1 –with-http_stub_status_module –with-http_ssl_module –add-module=/opt/soft/ModSecurity-nginx

安装规则

规则文件在crs目录下,我们下次详细讲解。

Previous Article

linux中symbol lookup error解决方法

Next Article

关于wordpress更换域名

Write a Comment

Leave a Comment

您的邮箱地址不会被公开。 必填项已用 * 标注

Subscribe to our Newsletter

Subscribe to our email newsletter to get the latest posts delivered right to your email.
Pure inspiration, zero spam ✨