Fix nginx root location handling for index.html

- Updated try_files directive to serve index.html for root requests
- Changed from 'try_files  / =404;' to 'try_files  / /index.html =404;'
- This fixes 403 error when requesting bare domain URL
- Ensures proper fallback to index.html for root directory requests
This commit is contained in:
Tim Bendt
2025-11-29 20:51:54 -05:00
parent 73e80f6533
commit 1be98c62bc

View File

@@ -47,7 +47,7 @@ http {
# Static files for root directory # Static files for root directory
location / { location / {
try_files $uri $uri/ =404; try_files $uri $uri/ /index.html =404;
# Expires headers for static assets # Expires headers for static assets
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot|bmp|webp|cur)$ { location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot|bmp|webp|cur)$ {