国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > Nginx > 正文

Nginx之為已安裝nginx動態添加模塊的方法

2024-08-30 12:29:31
字體:
來源:轉載
供稿:網友

說明:

已經安裝好的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. 加入需要安裝的模塊,重新編譯,如這里添加–add-module=/data/software/ngx_http_google_filter_module

# ./configure --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_google_filter_module# make  //千萬不要make install,不然就真的覆蓋了

4. 替換nginx二進制文件:

# cp /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak# cp ./objs/nginx /usr/local/nginx/sbin/

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持VEVB武林網。


注:相關教程知識閱讀請移步到服務器教程頻道。
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 兴义市| 巴马| 甘泉县| 册亨县| 朝阳区| 东乌珠穆沁旗| 屏东市| 赤峰市| 屏东市| 鞍山市| 罗定市| 枣强县| 凤山县| 黔西县| 平遥县| 赞皇县| 鲁山县| 昌乐县| 唐河县| 双牌县| 玛纳斯县| 应用必备| 郧西县| 呼和浩特市| 渝北区| 克拉玛依市| 河北区| 香格里拉县| 吉木乃县| 夹江县| 临邑县| 方正县| 时尚| 顺昌县| 石楼县| 安远县| 迭部县| 景宁| 河东区| 炉霍县| 赤壁市|