"Repost" Linux system nginx load balancer 404 error handling method

Source: Internet
Author: User

Nginx Load Balancer 404 error handling method

Use Nginx to achieve load balancing, but the data of a group of servers is not implemented synchronization, the master server has data to be synchronized to other servers for a period of time upstream image.stream.com {server 192.168.1.25:8088;server 192.168.1.24:8088;server 192.168.1.23:8088;} When a user accesses a picture, there is a 60% chance that the file will not be found. Question: How to configure the following functions: 1. When the picture server is connected, if the machine is not in 24,23, the default option is to return another 25?
Workaround:
Proxy_next_upstream Error timeout Invalid_header http_500 http_503 http_404; Original address: http://www.2cto.com/os/201204/126368.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.