nginx配置,请求502转发到其它机器处理

来源:互联网 发布:js金额格式化 编辑:程序博客网 时间:2024/06/06 20:37

很简单,上代码:

#反向代理upstream backend {      server access-1:8080 ;      server access-2:8080 ;      server access-3:8080 ;    }#路由location / {            #看英文翻译就明白了            proxy_next_upstream error http_502;            proxy_next_upstream_timeout 10s;            proxy_next_upstream_tries 1;            proxy_pass http://backend/;        }
原创粉丝点击