unknown directive "geoip_country" on nginx/1.10.1

Dynamic modules must be explicitly loaded from the main section of the nginx configuration.

 load_module "modules/ngx_http_geoip_module.so";

Although the solution Michael proposed works the underlying problem is that nginx does not properly (sufficiently) load the modules from the /etc/nginx/modules-enabled/. Likely due to the wrong scope where these modules are loaded from.

Much better, permanent solution is to add this line to nginx.conf:

include /etc/nginx/modules-enabled/*;

Tags:

Nginx

Geoip