Nginx之 entity too large
背景:
nginx上传文件报" entity too large",原因是上传文件的大小超过了“client_max_body_size”的值
解决:
1.找到对应的nginx配置文件,有些是对应应用的配置文件
2.修改client_max_body_size值:
server { listen 80; server_name www.linkrmb.com; location / { proxy_pass http://xxxx/; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Cookie $http_cookie; client_max_body_size 1000m; } }
3.重启:
sbin/nginx -s reload
相关推荐
nginxs 2020-11-14
Guanjs0 2020-11-13
小木兮子 2020-11-11
yserver 2020-11-11
ssihc0 2020-11-11
windle 2020-11-10
HanksWang 2020-11-10
liuchen0 2020-11-10
Freshairx 2020-11-10
ccschan 2020-11-10
liwf 2020-11-10
Guanjs0 2020-11-09
AderStep 2020-11-09
zrtlin 2020-11-09
mqfcu 2020-11-10
windle 2020-10-29