diff --git a/nginx.conf b/nginx.conf index c787c9f..6ad948b 100644 --- a/nginx.conf +++ b/nginx.conf @@ -4,7 +4,20 @@ server { root /usr/share/nginx/html; index index.html; + # Landing page + location = / { + try_files /index.html =404; + } + + # Deck paths: /resume/, /resume/1, /demo/assets/style.css, etc. + # For /resume/1: $uri (no file) → $uri/ (no dir) → fallback to /resume/index.html + # For /demo/assets/style.css: $uri (real file) → served directly + location ~ ^/([^/]+)/ { + try_files $uri $uri/ /$1/index.html =404; + } + + # /resume (no trailing slash) → 301 redirect to /resume/ location / { - try_files $uri $uri/ $uri/index.html /index.html; + try_files $uri $uri/ =404; } }