Is Nginx official ngx_mod_http_geoip
compatible with GeoLite2 databases ? I can't get them working, so I assume they are not compatible ?

- 1,579
- 2
- 13
- 12
4 Answers
ngx_mod_http_geoip
is not compatible with GeoIP2 databases; you will need the ngx_http_geoip2_module instead. Note, however, that as of this writing the nginx
distribution packages I'm aware of don't include the ngx_http_geoip2_module
and you will need to compile NGINX from source and include ngx_http_geoip2_module
. See these instructions for an example of building this for Ubuntu.
Disclaimer: I wrote these instructions.

- 492
- 4
- 15
I found this site https://www.miyuru.lk/geoiplegacy which has recent datasets in DAT format converted from newer database formats.
These are compatible with the older nginx geoip module. So no need to build the geoip2 module from source.

- 413
- 6
- 14
-
Country works great. City not. Anyway: THANKS!!! – uav Nov 29 '19 at 14:18
The official module is called ngx_http_geoip_module and according to the documentation, requires the MaxMind GeoIP library.
http://nginx.org/en/docs/http/ngx_http_geoip_module.html
Given the official documentation, yes, you can assume they are not compatible, and that you really need the required one instead.

- 3,923
- 1
- 13
- 22

- 1
- 2
-
2Please don't link youtube videos like this, instead try to write your answers. – Federico Galli Jul 31 '17 at 14:23