413 Request Entity Too Large
。三者的区别在于作用域不同:
设置到http{}内,控制全局nginx所有请求报文大小;
设置到server{}内,控制该server的所有请求报文大小设置;
到location{}内,控制满足该路由规则的请求报文大小
server {
listen 80;
server_name my.site.com;
location / {
root html;
index index.html index.htm;
client_max_body_size 2g; # 此处最大允许2G,按需修改
}
}
Nginx报413 Request Entity Too Large
原文:https://www.cnblogs.com/JaxYoun/p/13091801.html