2

文件上传时报413错误

 3 years ago
source link: https://www.wencst.com/archives/320
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

文件上传时报413错误

作者: wencst 分类: Uncategorized,程序设计 发布时间: 2016-09-27 17:24 阅读: 3,371 次

413 Request Entity Too Large,提示413错误,说明上传的文件太大了。

我们所用的是nginx做代理,所以首先检查了一下nginx配置。

nginx在我们没有配置时,默认是1M(从网上查的),而我们恰好没有配置。

nginx配置上传文件大小需要在local中增加,如下图:

   client_max_body_size 10m;
   client_body_buffer_size 256k;

限制文件上传大小为10M,缓冲区代理缓冲用户端请求的最大字节数256K。

至此问题解决!

如果文章对您有用,扫一下支付宝的红包,不胜感激!

欢迎加入QQ群进行技术交流:656897351(各种技术、招聘、兼职、培训欢迎加入)


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK