Skip to main content
Topic: [ADDON] GeoIP Location (Read 2738 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: [ADDON] GeoIP Location

Reply #15
Are you using nginx? I ran into some issues between the latest nginx 1.13.8 and the maxminds geoip database. For some reason it was super slow with lookups, like 10 seconds for each reference  I reverted back to 1.13.7, problem solved. Or so I thought. After updating the geoip database files, things were sluggish with some unexpected behaviors. One of which the map took a while to populate after restarting nginx. So reverting the geoip files was in order as well. Didn't try the two latest versions together. Thought it wise to let them settle out the bugs first. Anyway, just throwing that out there.  ;)

I am on shared hosting. Not sure what OS they use.

Re: [ADDON] GeoIP Location

Reply #16
You can check php info in server config to check the OS. Mine is something like this:
$_SERVER['SERVER_SOFTWARE']   nginx/1.13.8

Re: [ADDON] GeoIP Location

Reply #17
Mine shows this:

$_SERVER['SERVER_SOFTWARE']   LiteSpeed

Re: [ADDON] GeoIP Location

Reply #18
I'm having issues getting this to work with geoip2 on nginx. How should the fastcgi_param be passed? It's probably just a variable naming issue.... ::)

Re: [ADDON] GeoIP Location

Reply #19
here is what I use.  This is on nginx version: nginx/1.14.1 with ngx_geoip2_module-3.2 ... this is for the GeoLite2 databases.

Code: [Select]
# GEOIP Variables
fastcgi_param  GEOIP_COUNTRY_CODE $geoip2_country_code;
fastcgi_param  GEOIP_COUNTRY_NAME $geoip2_country;
fastcgi_param  GEOIP_CITY_COUNTRY_CODE $geoip2_country_code;
fastcgi_param  GEOIP_CITY_COUNTRY_NAME $geoip2_country;
fastcgi_param  GEOIP_REGION $geoip2_region_code;
fastcgi_param  GEOIP_REGION_NAME $geoip2_region;
fastcgi_param  GEOIP_CITY $geoip2_city;
fastcgi_param  GEOIP_POSTAL_CODE $geoip2_postal_code;
fastcgi_param  GEOIP_CITY_CONTINENT_CODE $geoip2_continent_code;
fastcgi_param  GEOIP_LATITUDE $geoip2_latitude;
fastcgi_param  GEOIP_LONGITUDE $geoip2_longitude;
Squish squish. squish, squish, squish.
Find a bug,
Make a wish.