-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf
More file actions
37 lines (32 loc) · 998 Bytes
/
nginx.conf
File metadata and controls
37 lines (32 loc) · 998 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index app.html;
# HTML files — never cache (they reference hashed assets)
location ~* \.html$ {
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
try_files $uri =404;
}
# Landing page (Coolify root)
location = / {
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
try_files /app.html =404;
}
# Hashed assets — cache forever (filename changes on content change)
location /_assets/ {
add_header Cache-Control "public, max-age=31536000, immutable";
try_files $uri =404;
}
# Static assets (logo, music) — cache for 1 hour
location /Assets/ {
add_header Cache-Control "public, max-age=3600";
try_files $uri =404;
}
# Everything else
location / {
try_files $uri $uri/ =404;
}
}