宝塔面板安装的Nginx(已安装)如何添加echo-nginx-module模块

1. nginx添加模块

1.1 echo-nginx-module - 打印工具

在这里插入图片描述

# 从github官网获取echo模块
wget https://github.com/openresty/echo-nginx-module/archive/refs/tags/v0.62.tar.gz
tar -zxvf echo-nginx-module-0.62.tar.gz

# 查看版本以及配置信息 == 必须大写V == 里面的配置信息跟步骤4方法里面的Install_Configure几乎一样
nginx -V

# 进去宝塔的脚本目录
cd /www/server/panel/install


# 读修改宝塔官方写的脚本
vim nginx.sh

# 找到字符  ./configure - 如图1 添加模块
--add-module=/home/root/app/nginx-module/echo-nginx-module-0.62

# 大致了解宝塔写的nginx脚本逻辑内容 - 如图2 - 只需要看我框框部分的代码即可

# 更新nginx以及添加模块
sh nginx.sh update 1.21


# 更新完后查看echo模块是否存在
nginx -V

nginx.sh里面的Install_Configure方法 == ./configure配置修改

# 自行查看--add-module=字符添加到哪里即可
./configure --user=www --group=www --prefix=${Setup_Path} ${ENABLE_LUA} --add-module=${Setup_Path}/src/ngx_cache_purge --add-module=${Setup_Path}/src/nginx-sticky-module --with-openssl=${Setup_Path}/src/openssl --with-pcre=pcre-${pcre_version} ${ENABLE_HTTP2} --with-http_stub_status_module --with-http_ssl_module --with-http_image_filter_module --with-http_gzip_static_module --with-http_gunzip_module --with-ipv6 --with-http_sub_module --with-http_flv_module --with-http_addition_module --with-http_realip_module --with-http_mp4_module --with-ld-opt="-Wl,-E" --with-cc-opt="-Wno-error" --add-module=/www/server/nginx/modules/echo-nginx-module-0.62 ${jemallocLD} ${ENABLE_WEBDAV} ${ENABLE_NGX_PAGESPEED} ${ADD_EXTENSION} ${i_make_args}

在这里插入图片描述


nginx.sh关键代码阅读
在这里插入图片描述

可见echo模块已经添加上去
在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值