If the GeoIP2 is not working, you can try to install the IP2Locatoin Nginx
using the tutorial below.
https://www.ip2location.com/tutorials/how-to-use-ip2location-geolocation-with-nginx
Posted at Nginx Forum:
https://forum.nginx.org/read.php?2,281341,281352#msg-281352
___
There is another 3rd-party geolocation module that is based on IP2Location
LITE which is also free.
https://www.ip2location.com/developers/nginx
Posted at Nginx Forum:
https://forum.nginx.org/read.php?2,279227,279247#msg-279247
___
nginx mailing list
I have been using GeoIP module in Nginx. To my surprise, Maxmind has decided
to remove the latitude and longitude from the GeoLite2 database from 2019
and announced in https://dev.maxmind.com/geoip/geoip2/geolite2/ . I need to
use the coordinates information and don't want to pay for the commercial