Quantcast
Viewing all articles
Browse latest Browse all 53287

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

в 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

Viewing all articles
Browse latest Browse all 53287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>