profile/deploy/nginx-iliadobkin.com.conf.example
2026-03-25 11:18:57 -04:00

30 lines
912 B
Plaintext

# Install on the origin server (e.g. 10.0.10.124):
# sudo cp deploy/nginx-iliadobkin.com.conf.example /etc/nginx/sites-available/iliadobkin.com
# sudo ln -sf /etc/nginx/sites-available/iliadobkin.com /etc/nginx/sites-enabled/
# sudo nginx -t && sudo systemctl reload nginx
#
# Caddy in front should reverse_proxy to this host :80 (unchanged).
server {
listen 80;
listen [::]:80;
server_name iliadobkin.com www.iliadobkin.com;
root /var/www/iliadobkin.com;
index index.html;
# SPA: client-side routes fall back to index.html
location / {
try_files $uri $uri/ /index.html;
}
location = /index.html {
add_header Cache-Control "no-cache, no-store, must-revalidate";
}
# Optional: long cache for hashed assets (browser renames on each build)
location /assets/ {
add_header Cache-Control "public, max-age=31536000, immutable";
}
}