软件:- ^5 T' j# c; ?8 Q
wget http://nginx.org/download/nginx-1.9.0.tar.gz
. |. R9 x% I' V& E$ ^; G" `7 Star xzvf nginx-1.9.0.tar.gz3 R2 y$ B4 y% ?7 I. B
wget https://github.com/nbs-system/naxsi/archive/master.zip# c. Q9 @3 C7 A# _ v) }
mv master.zip naxsi-master.zip
# }- |6 {7 O) ]9 ]8 i+ Cunzip naxsi-master.zip: x. ]* `4 K1 m' | l( Z
& m5 k" F2 ]' ]8 yhttps://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/master.zip, v- J0 D) A4 Z3 h
mv master.zip ngx-master.zip) g3 H1 y3 B3 B0 |/ f% i$ E0 ?
unzip ngx-master.zip
2 P) g3 U @/ w; C# |; o3 m4 f$ n! W* V2 V3 U# \! T6 `4 E3 z
cd nginx-1.9.0
" _( _0 _6 t9 h7 x! c7 P' s$ e; b" S
[Bash shell] 纯文本查看 复制代码
./configure \
--user=www \
--group=www \
--prefix=/www/webserver/nginx-1.9.0 \
--sbin-path=/www/webserver/nginx-1.9.0/sbin/nginx \
--pid-path=/www/webserver/nginx-1.9.0/logs/nginx.pid \
--conf-path=/www/webserver/nginx-1.9.0/conf/nginx.conf \
--error-log-path=/www/webserver/nginx-1.9.0/logs/error.log \
--http-log-path=/www/webserver/nginx-1.9.0/logs/access.log \
--http-client-body-temp-path=/www/webserver/nginx-1.9.0/temp/client \
--http-proxy-temp-path=/www/webserver/nginx-1.9.0/temp/proxy \
--http-fastcgi-temp-path=/www/webserver/nginx-1.9.0/temp/fcgi \
--http-scgi-temp-path=/www/webserver/nginx-1.9.0/temp/scgi \
--http-uwsgi-temp-path=/www/webserver/nginx-1.9.0/temp/uwsgi \
--with-http_flv_module \
--with-http_stub_status_module \
--with-http_realip_module \
--with-http_ssl_module \
--with-http_spdy_module \
--with-http_gzip_static_module \
--with-ipv6 \
--with-pcre=/root/pcre-8.34 \
--with-http_sub_module \
--add-module=/root/ngx_http_substitutions_filter_module-master \
--add-module=/root/naxsi-master/naxsi_src
: {0 q6 o! p) @& V
9 T$ U( v7 r( U; B |