docker - 如何在 nginx 容器(nginx/1.17.8)中安装“geopip2”模块?
问题描述
我想geoip2
在 nginx 上安装模块。在查看文档时,它支持 Nginx Plus。
有点困惑,我们可以geopip2
在 Nginx 容器上安装模块吗?
以下是启用的现有版本和模块
nginx version: nginx/1.17.8
built by gcc 8.3.0 (Debian 8.3.0-6)
built with OpenSSL 1.1.1d 10 Sep 2019
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-g -O2 -fdebug-prefix-map=/data/builder/debuild/nginx-1.17.8/debian/debuild-base/nginx-1.17.8=. -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie'
解决方案
以下是我的发现:
Geoip2
是动态模块,不属于 Nginx OSS 版本。我们必须安装 Nginx Plus 才能Geoip2
启用模块。
推荐阅读
- arm - STM32L0 在设置 NVIC/GPIO 时冻结
- spring-boot - 显示 unicode 字符
- python - gridSearch 性能测量效果
- php - htaccess 重写 URL 不适用于 codeigniter 代码
- excel - 无法使用 VBA 代码打开多个工作簿并附加 Excel 工作表中的数据
- aws-data-pipeline - 有没有人在数据管道中使用 AWS 系统管理器参数来为管道中的参数分配值?
- swift - AVPlayer 音频锁屏更新停止工作,只有在另一个 AVPlayer 实例播放视频内容后
- python-3.x - WordCloud“模块”对象不可调用Python3
- spring - Spring boot security中授权服务关闭时的授权错误处理不起作用
- php - Slim PHP:如何根据用户 ID 进行 POST 或 PUT?