upstream testproxy { server 127.0.0.1:8080; server 127.0.0.1:8081; server 127.0.0.1:8082 backup; server 127.0.0.1:8083 backup; } server { listen 80; server_name localhost;
location / { proxy_pass http://testproxy; index index.html index.htm; } ###nginx与上游服务器(真实访问的服务器)超时时间 后端服务器连接的超时时间_发起握手等候响应超时时间 proxy_connect_timeout 1s; ###nginx发送给上游服务器(真实访问的服务器)超时时间 proxy_send_timeout 1s; ### nginx接受上游服务器(真实访问的服务器)超时时间 proxy_read_timeout 1s; } |
Nginx+Tomcat搭建多主多备(3)
于 2020-01-10 09:04:08 首次发布