Handling cities with the same name using the GeoIP module

Maxim Dounin mdounin at mdounin.ru
Mon Nov 15 15:11:56 UTC 2021


On Mon, Nov 15, 2021 at 08:46:29AM -0500, YvorL wrote:

> Hi Maxim,
> I  really appreciate your response!
> I just realized that in the background I'm converting the current GeoIP2
> database to legacy format (https://github.com/sherpya/geolite2legacy).
> As I mentioned before, when I logged $geoip_region, I got a full string
> instead of 2 symbols as it's defined in the official documentation. Is this
> because I'm not using the legacy database?

Most likely.

> One last question :) Sometimes I got "00" instead of the region, I reckon
> that means that the IP address (e.g., - Google app IP) isn't
> in the database file I'm using, right?

The "00" seems to be the default used by the converter:


Maxim Dounin

More information about the nginx mailing list