syntax error in default resolved

This commit is contained in:
2025-07-16 19:07:17 +02:00
parent 4307dd2d02
commit 0ceea61510

View File

@@ -2,24 +2,30 @@ server {
listen 80;
server_name localhost;
# Where your assets live
root /usr/share/nginx/html;
index index.html;
# --- STATIC WEB UI -------------------------------------------------------
# ---------- Default site (HTML/CSS/JS) ----------
location / {
try_files $uri $uri/ =404;
}
# --- MEDIA FILES ---------------------------------------------------------
# Anything with audio-ish extension gets correct MIME + long-term caching.
location ~ \.(opus|ogg|mp3|flac|wav)$ {
# 30-day client cache, tweak at will
# ---------- Audio (and optional video) ----------
# 30-day cache; adjust max-age as needed.
location ~ \.(opus|ogg|mp3|flac|wav|m4a|aac|mp4|webm)$ {
add_header Cache-Control "public, max-age=2592000" always;
# nginx:1.27 doesnt know .opus by default → teach it:
types { audio/opus opus; }
# Teach Nginx any MIME types it doesnt already know:
types {
audio/opus opus;
audio/mpeg mp3;
audio/mp4 m4a;
audio/aac aac;
video/mp4 mp4;
video/webm webm;
}
try_files $uri =404;
}
}
}