XuqmGroup-Web/nginx/default.conf

42 行
1.2 KiB
Plaintext

server {
listen 80;
server_name _;
root /usr/share/nginx/html/tenant;
index index.html;
location ~* ^/(?:releases/[^/]+/assets|assets)/ {
try_files $uri =404;
add_header Cache-Control "public, max-age=31536000, immutable" always;
}
location ~* ^/ops/(?:releases/[^/]+/assets|assets)/ {
root /usr/share/nginx/html;
try_files $uri =404;
add_header Cache-Control "public, max-age=31536000, immutable" always;
}
location ~* ^/docs/(?:releases/[^/]+/assets|assets)/ {
root /usr/share/nginx/html;
try_files $uri =404;
add_header Cache-Control "public, max-age=31536000, immutable" always;
}
location / {
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-cache, no-store, must-revalidate" always;
}
location /ops/ {
alias /usr/share/nginx/html/ops/;
try_files $uri $uri/ /ops/index.html;
add_header Cache-Control "no-cache, no-store, must-revalidate" always;
}
location /docs/ {
alias /usr/share/nginx/html/docs/;
try_files $uri $uri/ /docs/index.html;
add_header Cache-Control "no-cache, no-store, must-revalidate" always;
}
}