Compile Nginx with IPDB ModuleSep 20th 2019Words: 324
This post is created 2 years ago, the content may be outdated.
The IPIP.net provides a free GeoIP database that works well in CN. The database uses ipdb format and can be integrated in Nginx use either the HTTP module or the stream module. The module requires compilation. Here’s the step:
sudo /usr/sbin/nginx -t nginx: [emerg] module "/usr/share/nginx/modules/ngx_http_ipdb_module.so" version 1017003 instead of 1014002 in /etc/nginx/nginx.conf:5 nginx: configuration file /etc/nginx/nginx.conf test failed
Install latest Nginx
1 2 3 4 5 6 7 8 9 10
cd /tmp wget https://nginx.org/keys/nginx_signing.key sudo apt-key add nginx_signing.key
#/etc/apt/sources.list.d/nginx.list deb https://nginx.org/packages/mainline/debian/ <CODENAME> nginx deb-src https://nginx.org/packages/mainline/debian/ <CODENAME> nginx