HTTP 413 request Entity too Large
程序员文章站
2022-07-14 23:00:36
...
错误如下:
前端限制提交文件大小是4M。查资料得知 client_max_body_size default 1m,刚好图片超过了,另外小于1M的图片可以上传成功。可以排查出是这个配置太小的缘故。
在服务器查找配置文件 nginx.conf
aaa@qq.com:/# whereis nginx
nginx: /usr/sbin/nginx /etc/nginx /usr/share/nginx
aaa@qq.com:/# cd /etc/nginx
aaa@qq.com:/etc/nginx# ls
conf.d fastcgi_params koi-win nginx.conf scgi_params sites-enabled uwsgi_params
fastcgi.conf koi-utf mime.types proxy_params sites-available snippets win-utf
aaa@qq.com:/etc/nginx#
找到nginx.conf,修改 client_max_body_size 的大小,若没有,在http { … …}中加上这个值。重启nginx即可(service nginx restart)。
上一篇: Pycharm使用sns.distplot警告FutureWarning: `distplot` is a deprecated function and will be removed in a
推荐阅读
-
三个思路解决laravel上传文件报错:413 Request Entity Too Large问题
-
java.lang.IllegalArgumentException: Request header is too large
-
Request header is too large异常springboot解决方案
-
HTTP 413 request Entity too Large
-
http:413 Request Entity Too Large
-
Nginx 出现 413 Request Entity Too Large
-
NodeJS 413 request entity too large 暴力解决方案
-
413 Request Entity Too Large
-
上传文件出现413 Request Entity Too Large问题
-
svn 413 Entity too large