Nginx负载均衡配置文件样例

Nginx负载均衡配置文件样例

 

 

upstream backend-others {
            server 10.x.x.x max_fails=0 fail_timeout=10s;
            server 10.x.x.x:81 max_fails=0 fail_timeout=10s;           
            keepalive 20000;
        }

location / {
                   #防止502以及Timeout的发生
                   proxy_connect_timeout 75;
                   proxy_read_timeout 300;
                   proxy_send_timeout 300;
                   proxy_buffer_size 64k;
                   proxy_buffers   4 64k;
                   proxy_busy_buffers_size 128k;
                   proxy_temp_file_write_size 128k;
                   proxy_http_version 1.1;
                   proxy_set_header Connection "";
                   proxy_pass http://backend-others;

                }
                

 

                

参考:

http://www.cnblogs.com/shengs/p/4701905.html

http://www.cnblogs.com/jacktang/p/3669115.html

http://blog.csdn.net/seven_zhao/article/details/50145935

猜你喜欢

转载自crabdave.iteye.com/blog/2357738