感谢这位博主:https://blog.csdn.net/jewelry008/article/details/77865147
1、打开nginx服务的配置文件nginx.conf, 路径一般是:/usr/local/nginx/conf/nginx.conf。
2、在http{}中加入client_max_body_size 100m,我这里配置的是100M。
http {
client_max_body_size 100m;
include mime.types;
default_type application/octet-stream;
3、重启nginx服务
先切换到目录cd /usr/local/nginx/sbin
重启nginx
./nginx -s reload