Home >Backend Development >PHP Tutorial >Juan Antonio Samaranch centos nginx 163 installation process with waf

Juan Antonio Samaranch centos nginx 163 installation process with waf

WBOY
WBOYOriginal
2016-07-28 08:30:011100browse

wget http://nginx.org/download/nginx-1.6.3.tar.gz
wget http://nginx.org/download/nginx-1.8.1.tar.gz
wget http://zlib.net /zlib-1.2.8.tar.gz
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gz
wget http://www.openssl .org/source/openssl-fips-2.0.12.tar.gz
tar -zxvf nginx-1.6.3.tar.gz
tar -zxvf zlib-1.2.8.tar.gz
tar -zxvf pcre-8.38. tar.gz
tar -zxvf openssl-fips-2.0.12.tar.gz
cd openssl-fips-2.0.10
./config
make
sudo make install
cd zlib-1.2.8
./configure
make
sudo make install
cd pcre-8.38
./configure
make
sudo make install
cd nginx-1.6.3
./configure --with-pcre=../pcre-8.38 --with-zlib=.. /zlib-1.2.8 --with-openssl=../openssl-fips-2.0.12
make
sudo make install
cd /usr/local/nginx/sbin
sudo ./nginx
------ -----------------------
Add naxsi module
wget https://github.com/nbs-system/naxsi/archive/master.zip
mv master .zip naxsi-master.zip
unzip naxsi-master.zip
Execute the ./nginx -V command under the installed nginx/sbin/, you can view the original ./configure of nginx. Copy and add the naxsi module
Add :--add-module=../naxsi-master/naxsi_src
./configure --with-pcre=../pcre-8.38 --with-zlib=../zlib-1.2.8 --with-openssl =../openssl-fips-2.0.10 --add-module=../naxsi-master/naxsi_src
make
sudo make install
cp ~/naxsi-master/naxsi_config/naxsi_core.rules /usr/local/nginx /conf/
cd /usr/local/nginx/conf
vim mysite.rules
The content is as follows:
#------------------------
# LearningMode; CheckRule "$TRAVERSAL >= 4" BLOCK;
CheckRule "$EVADE >= 4" BLOCK;
CheckRule "$XSS >= 8" BLOCK;
#-------------------------- --------------
vim nginx.conf
Add the following configuration to the http part
include /usr/local/nginx/conf/naxsi_core.rules;
In the server location / {
# Add here:
include /usr/local/nginx/conf/mysite.rules;
}
#Add:
location /RequestDenied {
return 403;
}
Main reference:
http://blog.cnwyhx .com/centos-nginx-naxsi-install/
The above introduces the Juan Antonio Samaranch centos nginx 163 installation process with waf, including the content of Juan Antonio Samaranch. I hope it will be helpful to friends who are interested in PHP tutorials.


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn