nginx第三方模块下载地址:https://www.nginx.com/resources/wiki/modules/
unzip ngx_cache_purge-master.zip unzip nginx_tcp_proxy_module-master.zip tar zxvf nginx-1.8.0.tar.gz cd nginx-1.8.0 #提示:如果没有patch命令 yum install patch -y patch -p1 < /home/nginx_tcp_proxy_module-master/tcp.patch ./configure --prefix=/etc/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_realip_module --add-module=/home/nginx_tcp_proxy_module-master --add-module=/home/ngx_cache_purge-master make && make install
#查看已编译的模块:
/etc/nginx/sbin/nginx -V nginx version: nginx/1.8.0 built by gcc 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) built with OpenSSL 1.0.1e-fips 11 Feb 2013 TLS SNI support enabled configure arguments: --prefix=/etc/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_realip_module --add-module=/home/nginx_tcp_proxy_module-master --add-module=/home/ngx_cache_purge-master
本文出自 “9527” 博客,请务必保留此出处http://liangey.blog.51cto.com/9097868/1725680
原文地址:http://liangey.blog.51cto.com/9097868/1725680