Closed XinAnzzZ closed 5 years ago
这个应该是你本身nginx的设置问题,你设置一下client_max_body_size
的值即可,这个值是在http模块下设置,以下是我的http模块,你可以根据自己的需要来设置,顺便把各个timeout
的值也设置大一点,否则上传太久就会返回失败超时的错误:
http {
include mime.types;
default_type application/octet-stream;
error_log /usr/local/var/log/nginx/error.log;
access_log /usr/local/var/log/nginx/access.log;
sendfile on;
send_timeout 60s;
client_header_timeout 30s;
client_body_timeout 30s;
keepalive_timeout 65s;
client_max_body_size 500m;
fastcgi_connect_timeout 600;
fastcgi_send_timeout 600;
fastcgi_read_timeout 600;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 512k;
fastcgi_intercept_errors on;
include vhost/*.conf;
}
好的,谢谢大佬解答。