一、环境说明:
- windwos server 2012 R2 数据中心版 (阿里云ECS)
- msys2-x86_64-20211130
- Visual studio 2017 x86x64兼容性命令工具
- ActivePerl-5.26.3
- Mercurial-6.0
- prce-8.37
- openssl-1.0.1u
- zlib-1.2.8
- 源码包 nginx-1.16.1
nginx源码包下载 - upstream_check_module模块
模块下载地址
二、问题截图
- 显示找不到模块
- 不是找下图文件位置吗?不解 = =!
- 去掉模块尝试,配置成功,且编译成功。
三、部分命令
目录结构
|nginx-release-1.16.1
|-auto
|-conf
|-contrib
|-docs
|-misc
|-objs
|--lib
|---prce
|---openssl
|---zlib
|-src
|-upstream_check_module
①patch打补丁
nginx-relesae-1.16.1目录下
patch -p1 < upstream_check_module/check_1.16.1+.patch
②配置命令(msys2环境
nginx-relesae-1.16.1目录下
auto/configure --with-cc=cl --builddir=build --prefix= \
--conf-path=conf/nginx.conf --pid-path=logs/nginx.pid \
--http-log-path=logs/access.log --error-log-path=logs/error.log \
--sbin-path=nginx.exe --http-client-body-temp-path=temp/client_body_temp \
--http-proxy-temp-path=temp/proxy_temp \
--http-fastcgi-temp-path=temp/fastcgi_temp \
--with-cc-opt=-DFD_SETSIZE=1024 --with-pcre=objs/lib/pcre-8.37 \
--with-zlib=objs/lib/zlib-1.2.8 --with-openssl=objs/lib/openssl-1.0.1u \
--with-select_module --with-http_ssl_module --with-ipv6 \
--with-http_sub_module \
--add-module=upstream_check_module
③编译命令(Visual studio 2017 x86x64兼容性命令工具环境)
nginx-relesae-1.16.1目录下
nmake -f objs/Makefile
四、期望结果
能顺利加入upstream_check_module模块到Nginx中,最好解释一下add-module=第三方模块的配置过程与条件,感谢!