Upstream sent too big header while reading response headers from upstream solution 520 Bad Gateway

Source: Internet
Author: User

Key configuration

Proxy_buffer_size 64k;
Proxy_buffers 32k;

Proxy_busy_buffers_size 128k;

The placement reference is as follows

#user nobody;

Worker_processes 1;
#error_log Logs/error.log;
#error_log Logs/error.log Notice;

#error_log Logs/error.log Info;


#pid Logs/nginx.pid;


Events {worker_connections 1024;}
    HTTP {include mime.types;

    Default_type Application/octet-stream; #log_format Main ' $remote _addr-$remote _user [$time _local] "$request" ' # ' $status $body _bytes_sen

    T "$http _referer" ' # ' "$http _user_agent" "$http _x_forwarded_for";

    #access_log Logs/access.log Main;
    Sendfile on;

    #tcp_nopush on;
    #keepalive_timeout 0;

    Keepalive_timeout 65;
	#gzip on;
	# 502 Bad Gateway Error Resolution configuration start proxy_buffer_size 64k;
	Proxy_buffers 32k;
	Proxy_busy_buffers_size 128k;
        # 502 Bad Gateway Error Resolution configuration End server {Listen 80;

        server_name yun.yyhvr.cn;

        #charset Koi8-r;

        #access_log Logs/host.access.log Main; Location/{root/oPt/yyh/font/yyh_web;
			
		Index index.html;
		# 502 Bad Gateway Error Resolution configuration start proxy_buffer_size 64k;
		Proxy_buffers 32k;
		Proxy_busy_buffers_size 128k;
        # 502 Bad Gateway Error resolution configuration end client_max_body_size 100m;
			} location/rest/{Proxy_pass http://localhost:8004;
		Client_max_body_size 100m;
        } error_page 502 503 504/50x.html;
        Location =/50x.html {root 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.