1. 程式人生 > 其它 >nginx第三方模組安裝方法(轉)

nginx第三方模組安裝方法(轉)

1.nginx第三方模組安裝方法

./configure --prefix=/你的安裝目錄  --add-module=/第三方模組目錄

2.在nginx安裝目錄中建立資料夾third_moule。
下載echo模組到nginx安裝目錄中的third_moule。

wget https://github.com/openresty/echo-nginx-module/archive/v0.61.tar.gz

3.解壓

sudo tar -zxvf v0.61.tar.gz

4.編譯

sudo ./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-ipv6 --with-http_sub_module --with-openssl=/usr/local/lnmp1.4-full/src/openssl-1.0.2l --with-http_image_filter_module --add-module=/usr/local/lnmp1.4-full/src/nginx-1.12.2/third_module/echo-nginx-module-0.61

5.安裝

sudo make

6.替換二級制檔案

sudo cp -f ./objs/nginx /usr/local/nginx/sbin/nginx

參考:nginx第三方模組安裝方法 - TBHacker - 部落格園 (cnblogs.com)

用一個例子來演示會更加清晰