nginx 413 Request Entity Too Large 解决办法
2017/10/3小于 1 分钟约 213 字
nginx 出现 413 Request Entity Too Large 的解决办法
今天打算传些图片上去,结果出现了这个错误,于是查下资料。
参考资料 nginx文档
Syntax: client_max_body_size size; Default: client_max_body_size 1m; Context: http, server, location
Sets the maximum allowed size of the client request body, specified in the “Content-Length” request header field. If the size in a request exceeds the configured value, the 413 (Request Entity Too Large) error is returned to the client. Please be aware that browsers cannot correctly display this error. Setting size to 0 disables checking of client request body size.
发现默认是设置成1m,这样有点小了,改下conf,重启nginx解决。
client_max_body_size 20m;