nginx: 关闭 HTTPS 的 HTTP/2,缓解大分片 multipart 断连(status 0)

Made-with: Cursor
This commit is contained in:
whm
2026-04-15 17:52:39 +08:00
parent 65574e3762
commit 800adb3322
3 changed files with 7 additions and 5 deletions

View File

@@ -9,7 +9,7 @@ upstream yh_admin_upstream {
server {
listen 443 ssl;
listen [::]:443 ssl;
http2 on;
# http2 HTTP/1.1 multipart HTTP/2
server_name yuheng.yuxindazhineng.com;
client_max_body_size 800m;

View File

@@ -19,8 +19,9 @@ upstream yh_admin_upstream {
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
# 关闭 http2大体积分片 multipart 在部分浏览器+HTTP/2 组合下易出现 ERR_HTTP2_PROTOCOL_ERROR / 网络面板 status 0
listen 443 ssl;
listen [::]:443 ssl;
server_name yuheng.yuxindazhineng.com;
client_max_body_size 800m;

View File

@@ -13,8 +13,9 @@ server {
# HTTPS整站反代到 compose 内 Nginx宿主机 443 → 127.0.0.1:8443
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
# 与 yuheng.host.conf 一致:大文件/分片上传在 HTTP/1.1 下更稳
listen 443 ssl;
listen [::]:443 ssl;
server_name yuheng.yuxindazhineng.com;
ssl_certificate /etc/ssl/yh_web/yuheng.yuxindazhineng.com/fullchain.pem;