找到配置文件:
粘上一段我配置好的配置片段:
upstream redislock {
server localhost:8080;
server localhost:8081;
}
server {
listen 80;
server_name localhost;
location / {
proxy_pass http://redislock/d1;
#root html;
#index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
上一张神图,解释的清清楚楚:
l
OK,也可以设置轮询策略: