一、问题现象 前端上传图片失败,nginx错误日志文件(/var/log/nginx/error.log)中的报错信息为:“client intended to send too large body: 2274148 bytes”。 二、解决方案 1、修改nginx配置文件 /etc/nginx/nginx.conf 中的 http{} 中增加如下配置: client_max_body_size 64m; 2、重启nginx服务 systemctl restart nginx