Nginx GeoIP2模块

http {
	geoip_country /usr/local/nginx/geoip.dat;
	map $geoip_country_code $allowed_country {
	 default no; # 默认不允许,如果改为 yes 表示默认允许
	 CN yes;    #区域允许,这个CN就是代表中国,如果是多个地区,就是CN下面加就行
	}
}
posted @ 2025-04-09 11:59  程序员の奇妙冒险  阅读(40)  评论(0)    收藏  举报