說明:
已經安裝好的nginx,需要添加一個未被編譯安裝的模塊,需要怎么弄呢?
具體:
這里以安裝第三方ngx_http_google_filter_module模塊為例
nginx的模塊是需要重新編譯nginx,而不是像apache一樣配置文件引用.so
1. 下載第三方擴展模塊ngx_http_google_filter_module
# cd /data/software/# git clone https://github.com/cuber/ngx_http_google_filter_module
2. 查看nginx編譯安裝時安裝了哪些模塊
# nginx -Vnginx version: nginx/1.8.0built by gcc 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) built with OpenSSL 1.0.1e-fips 11 Feb 2013TLS SNI support enabledconfigure arguments: --prefix=/usr/local/nginx --with-http_ssl_module --with-http_sub_module --with-http_gzip_static_module --with-http_stub_status_module --add-module=/data/software/ngx_http_substitutions_filter_module
可以看出編譯安裝使用了--prefix=/usr/local/nginx --with-http_ssl_module --with-http_sub_module --with-http_gzip_static_module --with-http_stub_status_module --add-module=/data/software/ngx_http_substitutions_filter_module這些參數。--add-module=/data/software/ngx_http_substitutions_filter_module是之前編譯添加ngx_http_substitutions_filter_module模塊時添加
3. 加入需要安裝的模塊,重新編譯,如這里添加 主站蜘蛛池模板: 宁强县| 宁化县| 富源县| 太谷县| 额济纳旗| 韶关市| 龙口市| 武平县| 彰化县| 自治县| 友谊县| 田阳县| 山丹县| 伊吾县| 依兰县| 青龙| 吉木萨尔县| 关岭| 乐清市| 阜新| 鞍山市| 甘谷县| 上犹县| 黄大仙区| 隆回县| 北宁市| 龙井市| 九龙坡区| 日喀则市| 沽源县| 喀喇沁旗| 六安市| 万载县| 双城市| 托里县| 门源| 乌兰察布市| 湟中县| 慈溪市| 淄博市| 龙岩市|