nginx的upstream的配置信息
upstream qq.xiaoyu.cn { server 192.168.1.139:80 max_fails=3 fail_timeout=30s; server 192.168.1.140:80 max_fails=3 fail_timeout=30s; } server { listen 80; server_name qq.xiaoyu.cn; access_log /home/logs/nginx/qq.xiaoyu.cn/access_log main; error_log /home/logs/nginx/qq.xiaoyu.cn/error_log; log_not_found on; location / { proxy_pass http://qq.xiaoyu.cn; proxy_set_header Host $host:$server_port; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-PORT $remote_port; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_connect_timeout 300; proxy_send_timeout 300; proxy_read_timeout 600; proxy_buffers 4 256k; proxy_busy_buffers_size 256k; proxy_temp_file_write_size 256k; proxy_next_upstream error timeout invalid_header http_502 http_503 http_504; proxy_max_temp_file_size 128m; } }
原文地址:https://www.cnblogs.com/xzlive/p/9293318.html
时间: 2024-10-05 01:19:22