Welcome! Log In Create A New Profile

Advanced

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

January 31, 2013 05:27AM
в nginx.conf добавил:
#### GEOIP ADDON ############
geo $geo_wipmania {
include /usr/local/GeoIP/worldip.opera.conf;
include /usr/local/GeoIP/worldip.conf;
include /usr/local/GeoIP/worldip.added.conf;
default XX;
}
###############################

в любом месте хоста, где надо ограничить доступ по гео - ставлю
##################################################
# geo rewrite if country not RU, UA and unknown
if ($geo_wipmania !~ "^(RU|UA|XX)$") {
rewrite ^/(.*)$ http://1live.ru/notaccess.html last;
# return 416;
}

файлики можно взять на http://static.wipmania.com/static/worldip.cidr.zip
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: 175
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