RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
centosnginxupstreamnextserver的写法一例

http {

成都创新互联主要从事成都网站建设、网站制作、网页设计、企业做网站、公司建网站等业务。立足成都服务江汉,十余年网站建设经验,价格优惠、服务专业,欢迎来电咨询建站服务:18980820575

proxy_next_upstream error timeout http_500 http_502 http_503 http_504 http_404;

proxy_connect_timeout 60s;

proxy_read_timeout 120s;

server {

location / {

proxy_next_upstream error timeout http_502 http_404;

proxy_connect_timeout 5s;

proxy_read_timeout 8s;

proxy_pass http://portal;

}

upstream upstream {

server 1.1.1.1 max_fails=1 fail_timeout=1800s;

server 2.2.2.2 backup;

server 3.3.3.3 backup;

}

    }

}

我的理解:

1、全局可以设置一个超时时间和定义切换nextserver条件,对各个server的每个location也可以有独立的定义。

2、连接失败一次,就要等半小时后再尝试这个节点了。


当前文章:centosnginxupstreamnextserver的写法一例
链接URL:http://cqwzjz.cn/article/gdohgi.html