Windows下编译安装Nginx并额外添加模块

原文地址:https://blog.csdn.net/tiahaole/article/details/128801014

这里实际操作中遇到的问题:

1.添加额外的模块,是在下面的命令最后添加:

auto/configure \
--with-cc=cl \
--builddir=build \
--with-debug \
--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=1024 \
--with-pcre=build/lib/pcre2-10.35 \
--with-zlib=build/lib/zlib-1.2.13 \
--with-http_v2_module \
--with-http_realip_module \
--with-http_addition_module \
--with-http_sub_module \
--with-http_dav_module \
--with-http_stub_status_module \
--with-http_flv_module \
--with-http_mp4_module \
--with-http_gunzip_module \
--with-http_gzip_static_module \
--with-http_auth_request_module \
--with-http_random_index_module \
--with-http_secure_link_module \
--with-http_slice_module \
--with-mail \
--with-stream \
--with-openssl=build/lib/openssl-1.1.1s \
--with-openssl-opt='no-asm no-tests -D_WIN32_WINNT=0x0501' \
--with-http_ssl_module \
--with-mail_ssl_module \
--with-stream_ssl_module \
--with-stream_ssl_preread_module

--add-module=模块本身的文件夹地址

2.引入的第三方包中使用pcre中的函数,在pcre2中不存在

解决方法是在上面的命令中引入pcre的地方改为pcre-8.45(从官网上下载)

posted @ 2023-12-21 21:35  八方鱼  阅读(1224)  评论(0)    收藏  举报