Files
armandine/conf.d/default.conf
mifi 24fc1cb9b9
Some checks failed
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/build Pipeline failed
ci/woodpecker/push/deploy unknown status
Forgot the Nginx conf...
2026-02-14 19:10:08 -03:00

41 lines
1.0 KiB
Plaintext

server {
listen 80;
listen [::]:80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
# HTML: revalidate so content updates are seen quickly
location ~* \.html?$ {
add_header Cache-Control "public, no-cache";
try_files $uri $uri/ =404;
}
# Versioned/hashed assets: long cache, immutable
location ~* \.(js|css)$ {
expires 1y;
add_header Cache-Control "public, immutable";
try_files $uri =404;
}
# Images and media
location ~* \.(ico|png|jpg|jpeg|gif|webp|svg|avif)$ {
expires 30d;
add_header Cache-Control "public";
try_files $uri =404;
}
# Fonts
location ~* \.(woff2?|ttf|otf|eot)$ {
expires 1y;
add_header Cache-Control "public, immutable";
try_files $uri =404;
}
# Default: serve static files, then try directory/index, then 404
location / {
add_header Cache-Control "public, no-cache";
try_files $uri $uri/ /index.html =404;
}
}