上传文件时控制台出现了413  Request Entity Too Large的问题。将Nginx中加入client_max_body_size参数并调整合适的大小(如果没有该参数就要加入)。

解决方法:

1、打开nginx服务的配置文件nginx.conf, 路径一般是:/usr/local/nginx/conf/nginx.conf。

2、在http{}中加入client_max_body_size 10m,我这里配置的是10M。

http {
    client_max_body_size 10m;
    include       mime.types;
    default_type  application/octet-stream;

   ......

}

  

3、重新nginx服务

./nginx -s reload

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-09
  • 2021-12-17
  • 2021-08-03
猜你喜欢
  • 2022-01-28
  • 2021-08-31
  • 2021-11-10
相关资源
相似解决方案