easyengine icon indicating copy to clipboard operation
easyengine copied to clipboard

GeoIP2

Open frederichoule opened this issue 10 years ago • 13 comments

Any (plan to/way to) enable support for GeoIP2 MaxMind databases?

See: https://github.com/leev/ngx_http_geoip2_module/blob/master/README.md

Thanks.

frederichoule avatar Dec 15 '15 15:12 frederichoule

I think this would make GeoIP requests faster, using the new Maxmind database format. Seems like relatively simple to enable. What do you think?

frederichoule avatar Jan 04 '16 14:01 frederichoule

https://github.com/leev/ngx_http_geoip2_module/blob/master/README.md (working URL link)

+1

On Monday, January 4, 2016, Frederic Houle [email protected] wrote:

I think this would make GeoIP requests faster, using the new Maxmind database format. Seems like relatively simple to enable. What do you think?

— Reply to this email directly or view it on GitHub https://github.com/EasyEngine/easyengine/issues/654#issuecomment-168693086 .

MattyLB avatar Jan 04 '16 17:01 MattyLB

Any update on this? Seems like relatively easy to implement. Thanks!

frederichoule avatar May 16 '16 22:05 frederichoule

I'm now getting warnings from WooCommerce stating that the MaxMind GeoIP Database does not exist. I never had this issue before, so I'm assuming it's a new requirement in WooCommerce 2.6.x and/or WP 4.5.x?

Anyway, here is the warning from Admin > WooCommerce (2.6.1) > System Status ...

MaxMind GeoIP Database: The MaxMind GeoIP Database does not exist - Geolocation will not function. You can download and install it manually from http://dev.maxmind.com/geoip/legacy/geolite/ to the path: /var/www/zipswap.com/htdocs/wp-content/uploads/GeoIP.dat

MattyLB avatar Jun 30 '16 08:06 MattyLB

Any update on GeoIP2 Module?

frederichoule avatar May 04 '17 13:05 frederichoule

Ok so I built it using the nginx-build repo from EasyEngine. Here is the dynamic module you can include with "load_module". ngx_http_geoip2_module.zip

frederichoule avatar May 04 '17 19:05 frederichoule

So @frederichoule How do I install this module on easyengine, and do I need to remove the old Geoip(version1)?

mexiter avatar Feb 20 '18 19:02 mexiter

This is how I did it:

/etc/nginx/nginx.conf

include /etc/nginx/modules/*.conf;

/etc/nginx/modules/geoip2.conf

load_module /etc/nginx/modules/ngx_http_geoip2_module.so;

geoip2 /etc/nginx/modules/GeoIP2-Country.mmdb {
  $geoip2_country_code default=CA country iso_code;
}

frederichoule avatar Feb 20 '18 19:02 frederichoule

@frederichoule Thank you,

I get an error ""load_module" directive is not allowed here in /etc/nginx/conf.d/geoip2.conf:1"

mexiter avatar Feb 22 '18 11:02 mexiter

In V4, we are using https://openresty.org/ and it seems geoip2 is not already included. If anyone has a workaround for this with openresty, please send a pull request or atleast provide details for us to work on.

rahul286 avatar Jun 02 '18 12:06 rahul286

Any chances to see this in ee 3.8.2 with nginx 1.14.0?

s-a-s-k-i-a avatar Jun 14 '18 08:06 s-a-s-k-i-a

Sorry, I uploaded the wrong version, not once, but twice. Here is the good one for Nginx 1.14.0, and it works with EE 3.8.2.

ngx_http_geoip2_module.zip

frederichoule avatar Jun 20 '18 15:06 frederichoule

We will be happy to add this either via a contribution to openresty or an EE package. Currently we wont be able to put any efforts into handling this in core.

rahul286 avatar Aug 03 '18 13:08 rahul286