22149#0: *2723086 client intended to send too large body: 1598963 bytes, client: 222.89.182.102, server: wenda.feishuceshi.com, request: "POST /tool/test HTTP/1.1", host: "wenda.feishuceshi.com", referrer: "http://wenda.feishuceshi.com/tool/test"
原文做错是413 Request Entity 错误提示
就是个普通的上传接口用Nginx做Server的转发,出现这类错误此错误是上传文件超过了Nginx默认上传文件的大小
Nginx默认上传字节为1mB
server {
listen 80; //端口
server_name wenda.feishuceshi.com; //name
client_max_body_size 100m; //上传配置大小
location / {
root /www/wwwroot/wenda.feishuceshi.com/dist; //前端存放路径dist是Vue打包后的文件
try_files $uri $uri/ /index.html;
index index.html index.htm; //首页为index.html,index,index.htm
}
修改完之后重启Nginx配置就可以了