记录一次nginx的upstream的配置信息
Posted 小刀
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了记录一次nginx的upstream的配置信息相关的知识,希望对你有一定的参考价值。
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; } }
以上是关于记录一次nginx的upstream的配置信息的主要内容,如果未能解决你的问题,请参考以下文章
nginx 错误502 upstream sent too big header while reading response header from upstream