nginx新增模組的步驟:
#1、下載模組
##
git clone https://github.com/agentzh/echo-nginx-module
mv echo-nginx-module-master /usr/local/src/nginx-1.8.1/echo-nginx-module
/usr/local/nginx/sbin/nginx -V
--user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-ipv6
./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --add-module=/usr/local/src/nginx-1.8.1/echo-nginx-module --with-ipv6 make
cp /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak
cp /usr/local/src/nginx-1.8.1/objs/nginx /usr/local/nginx/sbin/nginx
ln -s /usr/local/nginx/sbin/nginx /usr/local/bin/nginx(做软链,添加到环境变量) nginx -t (检测配置文件) nginx -s reload (平滑重启)
以上是nginx怎麼加入新模組?的詳細內容。更多資訊請關注PHP中文網其他相關文章!