您的位置:首页 > 产品设计 > UI/UE

Failed to load resource: the server responded with a status of 413 (Request Entity Too Large)

2015-06-24 14:08 811 查看
Node应用,使用formidable处理文件上传,本地测试没有问题,部署到服务器上之后上传大文件浏览器收到以下错误信息:

Failed to load resource: the server responded with a status of 413 (Request Entity Too Large)


原因是服务器使用Nginx做代理而限制了上传文件的大小,修改Nginx配置:

location / {
client_max_body_size  100M;
proxy_pass http://node_app; }


在location 下面增加client_max_body_size 100M;配置项,重启Nginx文件上传成功.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: