"$host" $backend_map {
"~11.*$" backend11.local:10100;
"~10.*$" backend10.local:10100;
"~9.*$" backend9.local:10100;
"~8.*$" backend8.local:10100;
"~7.*$" backend7.local:10100;
"~6.*$" backend6.local:10100;
"~5.*$" backend5.local:10100;
"~4.*$" backend4.local:10100;
"~3.*$" backend3.local:10100;
"~2.*$" backend2.local:10100;
"~1.*$" backend1.local:10100;
"~.*$" upstream_api1;
}
location /requesturi {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Original-URL $scheme://$server_name$request_uri;
proxy_next_upstream error timeout http_503;
proxy_read_timeout 2s;
proxy_connect_timeout 2s;
proxy_next_upstream_tries 3;
proxy_set_header Connection "keep-alive";
proxy_http_version 1.1;
proxy_pass http://$backend_map;
}
вопрос был про upstream_api1 в случае default
? какой вопрос?
Обсуждают сегодня