我在为 nginx 编译“geoip2”时遇到问题。我的“.so”不起作用。
我的安装方式:
- 光盘/选择/
- sudo add-apt-repository ppa:maxmind/ppa && apt update & sudo apt install libmaxminddb0 libmaxminddb-dev mmdb-bin
- git 克隆https://github.com/leev/ngx_http_geoip2_module.git
- wget http://nginx.org/download/nginx-1.15.8.tar.gz && tar xzfv nginx-1.15.8.tar.gz && cd nginx-1.15.8/
- ./configure --with-compat --add-dynamic-module=/opt/ngx_http_geoip2_module && make && make install
... 测试 !-f '/usr/local/nginx/modules/ngx_http_geoip2_module.so' \ || mv '/usr/local/nginx/modules/ngx_http_geoip2_module.so' \ '/usr/local/nginx/modules/ngx_http_geoip2_module.so.old' cp objs/ngx_http_geoip2_module.so '/usr/local/nginx/modules/ngx_http_geoip2_module.所以'make[1]: 离开目录'/opt/nginx-1.15.8 ...
cp /usr/local/nginx/modules/ngx_http_geoip2_module.so /usr/share/nginx/modules/ngx_http_geoip2_module.so
添加行 load_module "modules/ngx_http_geoip2_module.so";在我的 nginx.conf 中重新启动 nginx。
重启后我的nginx安装中没有加载geoip2
nginx 版本:使用 OpenSSL 1.1.1 构建的 nginx/1.15.8 2018 年 9 月 11 日(使用 OpenSSL 1.1.1a 2018 年 11 月 20 日运行)启用 TLS SNI 支持配置参数:--with-cc-opt='-g -O2 -fdebug -prefix-map=/build/nginx-2CZdMa/nginx-1.15.8=。-fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -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.
谁是我的失败或问题?