templates/configmap.yaml を更新
This commit is contained in:
@@ -47,7 +47,16 @@ data:
|
|||||||
rewrite ^(/[^/]+)?(/.*\.php) $2 last;
|
rewrite ^(/[^/]+)?(/.*\.php) $2 last;
|
||||||
}
|
}
|
||||||
|
|
||||||
# PHP処理(最優先)
|
# 静的ファイル(画像、CSS、JSなど)
|
||||||
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot|webp)$ {
|
||||||
|
expires max;
|
||||||
|
log_not_found off;
|
||||||
|
access_log off;
|
||||||
|
add_header Cache-Control "public, immutable";
|
||||||
|
try_files $uri =404;
|
||||||
|
}
|
||||||
|
|
||||||
|
# PHP処理
|
||||||
location ~ \.php$ {
|
location ~ \.php$ {
|
||||||
try_files $uri =404;
|
try_files $uri =404;
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
@@ -70,20 +79,11 @@ data:
|
|||||||
fastcgi_read_timeout 300;
|
fastcgi_read_timeout 300;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# その他全て(パーマリンク対応)
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.php?$args;
|
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)$ {
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
||||||
expires max;
|
expires max;
|
||||||
log_not_found off;
|
log_not_found off;
|
||||||
@@ -94,12 +94,14 @@ data:
|
|||||||
location = /favicon.ico {
|
location = /favicon.ico {
|
||||||
log_not_found off;
|
log_not_found off;
|
||||||
access_log off;
|
access_log off;
|
||||||
|
try_files $uri =404;
|
||||||
}
|
}
|
||||||
|
|
||||||
location = /robots.txt {
|
location = /robots.txt {
|
||||||
allow all;
|
allow all;
|
||||||
log_not_found off;
|
log_not_found off;
|
||||||
access_log off;
|
access_log off;
|
||||||
|
try_files $uri =404;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ /\. {
|
location ~ /\. {
|
||||||
|
|||||||
Reference in New Issue
Block a user