Welcome! Log In Create A New Profile

Advanced

GeoIP Question

January 08, 2019 04:32PM
Hi All
I would really appreciate some help here. I want to restrict all countries except the US and Jamaica (JM).

load_module "/usr/local/libexec/nginx/ngx_http_geoip_module.so";

These are my entries in nginx.conf

Under http
map $geoip_country_code $country_access {
"US" 0;
"JM" 0;
default 1;
}

Under HTTP Server
if ($country_access = '1') {
return 403;
}

Under HTTPS Server
server {
if ($country_access = '1') {
return 403;
}
Subject Author Posted

GeoIP Question

petrosetta January 08, 2019 04:32PM

Re: GeoIP Question

petrosetta January 08, 2019 04:34PM

Re: GeoIP Question

kycedbi January 08, 2019 05:36PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 94
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready