From 1d0855e59336bc76b17eac1816626a9ad12aa7ba Mon Sep 17 00:00:00 2001 From: pieter Date: Sat, 13 Dec 2025 11:06:51 +0000 Subject: [PATCH] =?UTF-8?q?templates/configmap.yaml=20=E3=82=92=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/configmap.yaml | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/templates/configmap.yaml b/templates/configmap.yaml index 2c4ddb9..06ba068 100644 --- a/templates/configmap.yaml +++ b/templates/configmap.yaml @@ -47,21 +47,9 @@ data: rewrite ^(/[^/]+)?(/.*\.php) $2 last; } - location / { - try_files $uri $uri/ /index.php?$args; - } - - # WordPress管理画面 - location ~ ^/(wp-admin|wp-login\.php) { - try_files $uri $uri/ /index.php?$args; - } - - # パーマリンク対応(投稿・固定ページ) - location ~ ^/(.+)$ { - try_files $uri $uri/ /index.php?$args; - } - + # PHP処理(最優先) location ~ \.php$ { + try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass php-fpm; fastcgi_index index.php; @@ -82,6 +70,20 @@ data: fastcgi_read_timeout 300; } + location / { + try_files $uri $uri/ /index.php?$args; + } + + # WordPress管理画面 + location ~ ^/(wp-admin|wp-login\.php) { + try_files $uri $uri/ /index.php?$args; + } + + # パーマリンク対応(投稿・固定ページ) + location ~ ^/(.+)$ { + try_files $uri $uri/ /index.php?$args; + } + location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { expires max; log_not_found off;