nginx modsecurity install

Linux 2015. 9. 12. 02:43


 nginx web firewall modsecurity install

 

 

1. wget https://www.modsecurity.org/tarball/2.9.0/modsecurity-2.9.0.tar.gz

 

2. tar xvf modsecurity-2.9.0.tar.gz

 

3. cd modsecurity-2.9.0/

./configure --enable-standalone-module --disable-mlogc

make ( you only need to make )

 

4. cd src/nginx/

./configure --add-module=../mod_security/nginx/modsecurity

make

make install

 

5. cp modsecurity-2.9.0/modsecurity.conf-recommended /usr/local/nginx/conf/modsecurity.conf

   cp modsecurity-2.9.0/unicode.mapping /usr/local/nginx/conf/unicode.mapping

 

 

7. vim nginx.conf

location / {

           ModSecurityEnabled on;

           ModSecurityConfig modsecurity.conf;

 

8. /etc/init.d/nginx configtest

   /etc/init.d/nginx restart

'Linux' 카테고리의 다른 글

apache geoip 설정  (0) 2015.09.30
nagios centos6 install  (0) 2015.09.16
nginx ssl setup  (0) 2015.09.10
How to get the client IP when using CloudFront and nginx  (0) 2015.09.10
리눅스에서 라인수를 알고 싶을때  (0) 2015.09.10
Posted by pysany
,