Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

An example of how to write centos nginx upstream nextserver

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Http {

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

}

}

}

My understanding:

1. Globally, you can set a timeout and define the switching nextserver conditions, and each location of each server can also be defined independently.

2. If the connection fails, you will have to wait half an hour before you try this node.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report