解决 413 Request Entity Too Large

修改配置文件  vim /etc/nginx/sites-available/default,增加

	client_max_body_size 1000m;//最大上传大小
	proxy_connect_timeout 300s;//连接超时
	proxy_send_timeout 300s;//连接超时
	proxy_read_timeout 300s;//连接超时
server {
    listen 80;
    location / {
        proxy_pass http://localhost:5000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection keep-alive;
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
	client_max_body_size 1000m;
	proxy_connect_timeout 300s;
	proxy_send_timeout 300s;
	proxy_read_timeout 300s;
    }
}

  

猜你喜欢

转载自www.cnblogs.com/fireicesion/p/10942997.html