From 761d1731af2d11caa3374f984bfd4f8cf6db770a Mon Sep 17 00:00:00 2001 From: Masaharu Hayashi Date: Sun, 27 Sep 2026 22:19:36 +0000 Subject: [PATCH 1/3] =?UTF-8?q?fix(nginx):=20HTTP/1.0=20=E3=81=A7=E8=BB=A2?= =?UTF-8?q?=E9=80=81=E3=81=95=E3=82=8C=E3=81=9F=E3=83=AA=E3=82=AF=E3=82=A8?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=81=AB=E3=82=82=20gzip=20=E3=82=92?= =?UTF-8?q?=E5=8A=B9=E3=81=8B=E3=81=9B=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gzip_http_version 1.1 のため、HTTP/1.0 のリクエストには静的ファイル・ アプリの応答ともに圧縮がかからなかった。nginx などのリバースプロキシは 既定で HTTP/1.0 で転送するので、前段にプロキシを置く構成では gzip が まったく効かない。gzip_http_version を 1.0 にする。 あわせて gzip_types から text/html を外す(常に対象なので重複の警告が出ていた)。 weko.conf / weko-ams.conf / weko-ams-restricted.conf の3つに同じ変更を入れる。 Co-Authored-By: Claude Opus 5.5 --- nginx/weko-ams-restricted.conf | 3 +-- nginx/weko-ams.conf | 3 +-- nginx/weko.conf | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/nginx/weko-ams-restricted.conf b/nginx/weko-ams-restricted.conf index 9d97dc33a2..6fc7af191a 100644 --- a/nginx/weko-ams-restricted.conf +++ b/nginx/weko-ams-restricted.conf @@ -453,7 +453,7 @@ server { gzip on; gzip_disable "msie6"; - gzip_http_version 1.1; + gzip_http_version 1.0; # 前段のプロキシは既定で HTTP/1.0 で転送してくる gzip_comp_level 5; # or anything between 4-6 gzip_min_length 100; gzip_proxied any; @@ -479,7 +479,6 @@ server { image/x-icon text/cache-manifest text/css - text/html text/javascript text/plain text/vcard diff --git a/nginx/weko-ams.conf b/nginx/weko-ams.conf index c5b37d07f8..b487662f76 100644 --- a/nginx/weko-ams.conf +++ b/nginx/weko-ams.conf @@ -402,7 +402,7 @@ server { gzip on; gzip_disable "msie6"; - gzip_http_version 1.1; + gzip_http_version 1.0; # 前段のプロキシは既定で HTTP/1.0 で転送してくる gzip_comp_level 5; # or anything between 4-6 gzip_min_length 100; gzip_proxied any; @@ -428,7 +428,6 @@ server { image/x-icon text/cache-manifest text/css - text/html text/javascript text/plain text/vcard diff --git a/nginx/weko.conf b/nginx/weko.conf index 907134dcf2..528382f459 100644 --- a/nginx/weko.conf +++ b/nginx/weko.conf @@ -423,7 +423,7 @@ server { gzip on; gzip_disable "msie6"; - gzip_http_version 1.1; + gzip_http_version 1.0; # 前段のプロキシは既定で HTTP/1.0 で転送してくる gzip_comp_level 5; # or anything between 4-6 gzip_min_length 100; gzip_proxied any; @@ -449,7 +449,6 @@ server { image/x-icon text/cache-manifest text/css - text/html text/javascript text/plain text/vcard From 0966dc617355055c07f9a0038e00caba904b9b93 Mon Sep 17 00:00:00 2001 From: Masaharu Hayashi Date: Sun, 27 Sep 2026 22:55:56 +0000 Subject: [PATCH 2/3] =?UTF-8?q?fix(nginx):=20=E3=83=90=E3=82=A4=E3=83=8A?= =?UTF-8?q?=E3=83=AA=E3=81=AE=E3=83=80=E3=82=A6=E3=83=B3=E3=83=AD=E3=83=BC?= =?UTF-8?q?=E3=83=89=E3=82=92=20gzip=20=E3=81=AE=E5=AF=BE=E8=B1=A1?= =?UTF-8?q?=E3=81=8B=E3=82=89=E5=A4=96=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gzip_types に application/octet-stream が入っており、ファイルのダウンロード まで圧縮していた。圧縮の効かないバイナリに CPU を使ううえ、Content-Length が 付かなくなりダウンロードの進捗が出ない。3つの設定ファイルから外す。 Co-Authored-By: Claude Opus 5.5 --- nginx/weko-ams-restricted.conf | 1 - nginx/weko-ams.conf | 1 - nginx/weko.conf | 1 - 3 files changed, 3 deletions(-) diff --git a/nginx/weko-ams-restricted.conf b/nginx/weko-ams-restricted.conf index 6fc7af191a..d4eef27ad1 100644 --- a/nginx/weko-ams-restricted.conf +++ b/nginx/weko-ams-restricted.conf @@ -463,7 +463,6 @@ server { application/json application/ld+json application/manifest+json - application/octet-stream application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject diff --git a/nginx/weko-ams.conf b/nginx/weko-ams.conf index b487662f76..4ff74c9407 100644 --- a/nginx/weko-ams.conf +++ b/nginx/weko-ams.conf @@ -412,7 +412,6 @@ server { application/json application/ld+json application/manifest+json - application/octet-stream application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject diff --git a/nginx/weko.conf b/nginx/weko.conf index 528382f459..ee599a2549 100644 --- a/nginx/weko.conf +++ b/nginx/weko.conf @@ -433,7 +433,6 @@ server { application/json application/ld+json application/manifest+json - application/octet-stream application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject From 01ec93e8b6899d7ef25a2a0b3c56fea5f5bbf43c Mon Sep 17 00:00:00 2001 From: Masaharu Hayashi Date: Mon, 28 Sep 2026 00:01:47 +0000 Subject: [PATCH 3/3] =?UTF-8?q?fix(nginx):=20=E9=9D=9E=E6=8E=A8=E5=A5=A8?= =?UTF-8?q?=E3=81=AE=20ssl=20on=20=E3=82=92=20listen=20=E3=81=AE=20ssl=20?= =?UTF-8?q?=E6=8C=87=E5=AE=9A=E3=81=AB=E7=BD=AE=E3=81=8D=E6=8F=9B=E3=81=88?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nginx 1.15 以降、ssl ディレクティブは非推奨で、起動のたびに警告が出ていた。 listen 443 ssl に置き換える。3つの設定ファイルに同じ変更を入れる。 Co-Authored-By: Claude Opus 5.5 --- nginx/weko-ams-restricted.conf | 3 +-- nginx/weko-ams.conf | 3 +-- nginx/weko.conf | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/nginx/weko-ams-restricted.conf b/nginx/weko-ams-restricted.conf index d4eef27ad1..e48541c8b6 100644 --- a/nginx/weko-ams-restricted.conf +++ b/nginx/weko-ams-restricted.conf @@ -20,8 +20,7 @@ server { } server { - listen 443; - ssl on; + listen 443 ssl; ssl_protocols TLSv1.3 TLSv1.2; ssl_certificate /etc/nginx/server.crt; ssl_certificate_key /etc/nginx/server.key; diff --git a/nginx/weko-ams.conf b/nginx/weko-ams.conf index 4ff74c9407..f43fb66ca2 100644 --- a/nginx/weko-ams.conf +++ b/nginx/weko-ams.conf @@ -20,8 +20,7 @@ server { } server { - listen 443; - ssl on; + listen 443 ssl; ssl_protocols TLSv1.3 TLSv1.2; ssl_certificate /etc/nginx/server.crt; ssl_certificate_key /etc/nginx/server.key; diff --git a/nginx/weko.conf b/nginx/weko.conf index ee599a2549..de118b96e6 100644 --- a/nginx/weko.conf +++ b/nginx/weko.conf @@ -17,8 +17,7 @@ server { } server { - listen 443; - ssl on; + listen 443 ssl; ssl_protocols TLSv1.3 TLSv1.2; ssl_certificate /etc/nginx/server.crt; ssl_certificate_key /etc/nginx/server.key;