Welcome! Log In Create A New Profile

Advanced

Re: настройка доступа к сайту по GeoIP

Anton Yuzhaninov
January 31, 2013 04:40AM
On 01/31/13 13:29, kitius wrote:
> Через allow/deny слишком много подсетей писать, не хочется нагружать
> конфиг.
> Как быть?

map $geoip_country_code $bad_country {
default 1;
RU 0;
UA 0;
...
}

...

location /content/restricted {
if ($bad_country) {
return 403;
}

}

--
Anton Yuzhaninov

_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

настройка доступа к сайту по GeoIP

kitius January 31, 2013 04:29AM

Re: настройка доступа к сайту по GeoIP

Anton Yuzhaninov January 31, 2013 04:40AM

Re: настройка доступа к сайту по GeoIP

InventOR January 31, 2013 05:27AM

Re: настройка доступа к сайту по GeoIP

kitius January 31, 2013 11:53AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 270
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready