1、nginx配置修正
对nginx的配置文件(/etc/nginx/nginx.conf)进行变动。在nginx.conf文件中加上client_max_body_size 字段:
client_max_body_size 10M;

重启nginx:
Systemctl restart nginx
把稳:client_max_body_size 10M 必须要放在server下的server_name下,而不是放在localhost /web的大括号里。
2、PHP配置修正
1、修正php.ini(/etc/php.ini)配置文件,找到以下配置并修正:
post_max_size = 10M
upload_max_filesize = 10M
2、重启php-fpm
systemctl restart php-fpm