1、首先打开配置文件
vim /etc/nginx/nginx.conf
2、在http{}里面添加下面配置
# set client body size to 2M #
client_max_body_size 512M;
3、重启nginx
sudo systemctl restart nginx
这样就可以正常上传小于512M的文件了。
时间:2026-02-12 20:52:10
1、首先打开配置文件
vim /etc/nginx/nginx.conf
2、在http{}里面添加下面配置
# set client body size to 2M #
client_max_body_size 512M;
3、重启nginx
sudo systemctl restart nginx
这样就可以正常上传小于512M的文件了。