我使用yum安装了GeoIP包。我在geoIP文件夹中找到了/usr/share/GeoIP/
文件。我需要在:/etc/nginx/nginx.conf
中添加一些关于某些国家的规则,为此,我需要加载模块,比如:load_module modules/ngx_http_geoip2_module.so;
,以识别变量。请参见:
geoip_country /usr/share/GeoIP/GeoIP.dat;
那么我如何安装这个模块呢?我遵循本教程:https://github.com/leev/ngx_http_geoip2_模块/blob/master/README.md#安装和url是过时或无效的,不确定,但我不能下载它。另外,我已经安装了nginx。有什么建议吗?提前通知!
发布于 2020-12-05 12:36:55
请点击“代码”按钮下载ngx_http_geoip2_模块。
打开拉链。
假设它是在/home/someuser/ngx_http_geoip2_module-master
上解压缩的。
将此位置传递给--add-dynamic-module
of ./configure
:
./configure --add-dynamic-module=/home/someuser/ngx_http_geoip2_module-master
然后按照其余的指示。
https://serverfault.com/questions/1001671
复制相似问题