用于加载服务自动检测模块
1、准备工作
nginx源码、Visual Studio 2022(安装需要选择c++组件,用于编译nginx)、strawberry-perl(安装用于引入perl依赖)
msys2(用于初始化配置nginx,生成makefile文件)
2、安装vs、strawberry-perl、msys2
3、进入nginx源码文件夹,新建objs\lib文件夹,将openssl和pcre、zlib都解压到当前目录
4、打开msys2终端,进入nginx源码文件夹,执行一下命令
./configure \
--with-cc=cl \
--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 \
--http-scgi-temp-path=temp/scgi_temp \
--http-uwsgi-temp-path=temp/uwsgi_temp \
--with-cc-opt=-DFD_SETSIZE=32768 \
--wit