GeoIP
Create variables based on the client IP address, using the precompiled MaxMind GeoIP databases, for both HTTP and TCP/UDP traffic.
Installation Instructions
Install the GeoIP module.
For Amazon Linux, CentOS, Oracle Linux, and RHEL:
$ yum install nginx-plus-module-geoip
For Debian and Ubuntu:
$ apt-get install nginx-plus-module-geoip
For SLES:
$ zypper install nginx-plus-module-geoip
Put both of the following directives in the top‑level (“main”) context or the main NGINX Plus configuration file, /etc/nginx/nginx.conf:
load_module modules/ngx_http_geoip_module.so; load_module modules/ngx_stream_geoip_module.so;
Perform additional configuration as required by the module (HTTP, TCP/UDP).
Reload NGINX Plus to enable the module:
$ nginx -t && nginx -s reload