- 执行配置编辑命令
vi /etc/nginx/nginx.conf
; - 编辑
nginx.conf
文件,在http{}
段中加入以下字段client_max_body_size 20m;
//20m 为允许最大上传的大小 - 保存并退出
:wq
- 重启 nginx 和 php
systemctl restart nginx.service
systemctl restart php-fpm.service
分类: 系统运维
vi /etc/nginx/nginx.conf
;nginx.conf
文件,在 http{}
段中加入以下字段client_max_body_size 20m;
//20m 为允许最大上传的大小:wq
systemctl restart nginx.service
systemctl restart php-fpm.service
0 条评论