原因:使用 Nginx 服务器上传文件时,浏览器报 413 请求过大;
server {
listen 80;
server_name xxx.xxx.com;
rewrite ^(.*) https://$host$1 permanent;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name xxx.xxx.com;
ssl_certificate /ssl/xxx.xxx.com.cer;
ssl_certificate_key /ssl/xxx.xxx.com.key;
client_max_body_size 1024m; #添加该参数 调整Nginx上传大小参数
location / {
proxy_set_header X-FORWARDED-FOR $remote_addr;
proxy_set_header X-FORWARDED-PROTO $scheme;
proxy_set_header Host $http_host;
proxy_pass http://192.168.123.123:5244;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
感谢您的来访,获取更多精彩文章请收藏本站。
© 版权声明
THE END
暂无评论内容