环境:Cenots 7
此篇主要讲通过nginx-module-vts 监控nginx 运行状态,Nginx 安装与插件安装配置这里就不做讲解了
- Nginx 配置http 块,注意由于我配置使用了geoip2
geoip2 /usr/local/nginx/GeoIP/GeoLite2-Country.mmdb {
$geoip2_data_country_code country iso_code;
}
geo $allow-ip{
default no;
1.1.1.1 yes;
}
map $geoip2_data_country_code $allowed_co