【发布时间】:2016-08-11 03:52:04
【问题描述】:
假设我必须上游源
upstream first {
}
upstream second {
}
然后在server块中
map $geoip_country_code $is_china {
default no;
CN yes;
}
我想要实现的是如果$is_china,使用不同的上游
proxy_pass http://$preferred_host/;
我不知道如何用 nginx 做到这一点。
【问题讨论】:
标签: nginx load-balancing geo