Open alyumitskij opened 4 years ago
@alyumitskij do you have that file? If so, just change the nginx.conf, rebuild and it should do the trick.
Here is how it looks now (link):
# GeoIP2
geoip2 /usr/share/geoip/GeoLite2-Country.mmdb {
$geoip2_data_country_code source=$remote_addr country iso_code;
$geoip2_data_country_name source=$remote_addr country names en;
}
You might want to add another file just below, so it would look like this:
# GeoIP2 countries
geoip2 /usr/share/geoip/GeoLite2-Country.mmdb {
$geoip2_data_country_code source=$remote_addr country iso_code;
$geoip2_data_country_name source=$remote_addr country names en;
}
# GeoIP2 cities
geoip2 /usr/share/geoip/GeoLite2-City.mmdb {
$geoip2_data_city_name source=$remote_addr city names en;
}
You would also need to add GeoLite2-City.mmdb
to the Dockerfile, or mount it dynamically.
This is the best one, bro! But is it real to detect cities by GeoLite2-City.mmdb with this image? What should I edit to get it?