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