nginx编译时添加额外第三方模块

本文详细介绍了如何从GitHub下载并编译nginx-module-vts0.2.2版本,配置Nginx以支持虚拟主机流量统计,以及在服务器上启用和访问VTS页面的过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

比如要添加第三方流量监控模块nginx-module-vts

1、官网

官网 Releases · vozlt/nginx-module-vts · GitHubNginx virtual host traffic status module. Contribute to vozlt/nginx-module-vts development by creating an account on GitHub.icon-default.png?t=O83Ahttps://github.com/vozlt/nginx-module-vts/releases2、下载nginx-module-vts

找个合适的zip包下载,这里给给0.2.2版本的下载链接

wget https://github.com/vozlt/nginx-module-vts/archive/refs/tags/v0.2.2.zip

3-1、解压zip包

unzip v0.2.2.zip

3-2 、如果报错./configure: error: C compiler cc is not found

yum -y install gcc gcc-c++ autoconf automake make pcre-devel zlib-devel openssl openssl-devel GeoIP-devel.x86_64

4、编译nginx且添加第三方模块

./configure \
--prefix=/usr/local/nginx \
--user=nginx \
--group=nginx \
--with-http_ssl_module \
--with-stream=dynamic \
--with-http_realip_module \
--with-http_stub_status_module \
--with-http_gzip_static_module \
--with-http_gunzip_module \
--with-http_flv_module \
--with-http_mp4_module \
--pid-path=/run/nginx.pid \
--lock-path=/run/ningx.lock \
--with-http_geoip_module \
--with-http_auth_request_module \
--with-http_secure_link_module \
--http-log-path=/data/logs/nginx/access.log \
--error-log-path=/data/logs/nginx/error.log \
--with-debug \
--with
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

潇洒哥Kahn

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值