RHEL7 Load Balancer Configuration (iv)

Source: Internet
Author: User

RHEL7 down Nginx Load Balancing Configuration

in the first two sections of the installation and configuration files, here write the configuration file, you can modify the configuration file according to the content.

http {

upstream myserver{

Server 192.168.1.21:80 weight=2 max_fails=3 fail_timeout=20s;

Server 192.168.1.22:80 weight=3 max_fails=3 fail_timeout=20s;

Server 192.168.1.23:80 weight=4 max_fails=3 fail_timeout=20s;

}

server{

Listen ;

server_name 192.168.1.20;

index index.htm index.html;

root /application/nginx/html/

Location/{

Proxy_pass http://MyServer ;

Prox_next_upstream http_500 http_502 http_503 error Timeo UT invalid_header;

Proxy_redirect off;

Proxy_set_header Host $host;

Proxy_set_header x-real-ip $remote _addr;

Proxy_set_header x-forwarded-for $proxy _add_x_forwarded_for;

Client_body_buffer_size 128k;

Proxy_connect_timeout 60s;

Proxy_send_timeout 60s;

Proxy_read_timeout 60s;

Proxy_buffer_size 4k;

Proxy_buffers 4 32k;

Proxy_busy_buffers_size 64k;

Proxy_temp_file_write_size 64k;

}

}

}

This article is from "Flying with the Wind" blog, please be sure to keep this source http://wjb10000.blog.51cto.com/9702295/1792555

RHEL7 Load Balancer Configuration (iv)

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.