Files
kubernetes/py-deploy/template/nginx02/configmap.yaml
2026-03-23 10:33:13 +08:00

28 lines
762 B
YAML

apiVersion: v1
data:
{{ name }}.conf: >-
server {
listen 80;
server_name {{ superDomain }};
access_log /storage/nginx_logs/{{ name }}_access.log main;
error_log /storage/nginx_logs/{{ name }}_error.log;
location /nginx02 {
if ($request_filename ~* .*\.(?:htm|html)$) {
add_header Cache-Control "no-cache";
}
alias /storage/{{ name }};
index index.html index.htm;
try_files $uri $uri/ /nginx02/index.html;
}
error_page 404 /404.html;
location = /404.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
kind: ConfigMap
metadata:
name: configmap-{{ name }}
namespace: {{ namespace }}