Add nginx try_files config for clean URL routing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-03-09 19:09:36 -07:00
parent 076380cf9e
commit 07bed35517
2 changed files with 14 additions and 0 deletions

View File

@ -8,4 +8,5 @@ RUN pnpm build
FROM nginx:alpine
COPY --from=builder /app/out /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80

13
nginx.conf Normal file
View File

@ -0,0 +1,13 @@
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri.html $uri/ =404;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
}