以http_realip_module为例
cd /usr/local/nginx-1.12.2
./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_realip_module
make
mv /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.old
cp objs/nginx /usr/local/nginx/sbin/
两种方式重载nginx信号:
(1)自动
make upgrade
(2)手动
kill -USR2 `cat /usr/local/nginx/logs/nginx.pid`
kill -QUIT `cat /usr/local/nginx/logs/nginx.pid.oldbin`
查看模块情况:
/usr/local/nginx/sbin/nginx -V