您的位置:首页 > 运维架构 > Nginx

android文件上传413 nginx [error] 9679#0: *318855 client intended to send too large body: 1593409 bytes

2015-01-28 16:45 459 查看
问题描述:

android 图片文件上传服务器返回 413

ios 上传正常

排查:

# whereis nginx

# vi /etc/nginx/nginx.conf

查看日志存放地址

# cat /var/log/nginx/hiad.error.log

nginx [error] 9679#0: *318855 client intended to send too large body: 1593409 bytes

2015/01/28 10:36:07 [error] 9679#0: *318855 client intended to send too large body: 1593409 bytes,
client: 119.6.106.214, server: adtest.ihimi.net, request: "POST /wxkmsvc/dataService?app=mobile&controller=upload&action=upload HTTP/1.1", host: "。。。。。

解决方法:

修改/etc/php.ini 中的upload_max_filesize=20M;post_max_size = 20M
nginx 配置修改:

在http{}里添加参数client_max_body_size 20M;
keepalive_timeout 的值根据情况修改。调整超时时间。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐