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

约定不等于承诺〃 2022-07-13 03:43 331阅读 0赞

1、错误描述

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

Center

Center 1

2、错误原因

  1. 上传文件时,利用localhost访问系统,不会出现这个问题;用域名访问这个系统时,出现这个问题,提示是:请求实体太大

由于Nginx反向代理服务器client_max_body_size默认值为1MB,而上传文件大于1MB,所以就出现这个错误

3、解决办法

  1. 打开Nginx反向代理服务器nginx.conf配置文件,修改client\_max\_body\_size
  2. client\_max\_body\_size 30M

发表评论

表情:
评论列表 (有 0 条评论,331人围观)

还没有评论,来说两句吧...

相关阅读