![nginx:如果任何一个动态模块不同,是否会产生冲突?](https://linux22.com/image/789949/nginx%EF%BC%9A%E5%A6%82%E6%9E%9C%E4%BB%BB%E4%BD%95%E4%B8%80%E4%B8%AA%E5%8A%A8%E6%80%81%E6%A8%A1%E5%9D%97%E4%B8%8D%E5%90%8C%EF%BC%8C%E6%98%AF%E5%90%A6%E4%BC%9A%E4%BA%A7%E7%94%9F%E5%86%B2%E7%AA%81%EF%BC%9F.png)
我在 AWS 上有一个运行 Ubuntu 22.04 的实例,我在该实例上安装了 nginx 并克隆了该实例以构建 ngx_purgue_cache 模块。
这是我当前的 nginx 输出
$ nginx -V
nginx version: nginx/1.18.0 (Ubuntu)
built with OpenSSL 3.0.2 15 Mar 2022
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -ffile-prefix-map=/build/nginx-zctdR4/nginx-1.18.0=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -Wl,-z,now -fPIC' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-compat --with-debug --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads
--add-dynamic-module=/build/nginx-zctdR4/nginx-1.18.0/debian/modules/http-geoip2 --with-http_addition_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_sub_module
当我尝试使用 purgue_cache 模块编译 nginx 时,我意识到以下模块出现错误(未找到):
--add-dynamic-module=/build/nginx-zctdR4/nginx-1.18.0/debian/modules/http-geoip2
为了解决这个问题,我必须将 geoIp 重新编译为一个新的动态模块。
这产生了以下两个模块:
ngx_http_cache_purge_module.so
ngx_http_geoip2_module.so
我的问题是,如果我只是将 ngx_http_cache_purge_module.so 模块复制到包含另一个版本的 geoip 模块的生产实例中,我会遇到什么问题吗?