Fix nginx 404 handling - return 404 status for missing pages

Changed try_files fallback from /index.html to =404 so that
non-existent pages properly return 404 status and show the
custom 404 error page instead of serving index.html with 200.
parent 0cf1f90a
......@@ -33,7 +33,8 @@ server {
location / {
# Allow nginx to follow symlinks (for web/templates -> ../mbetterclient/qt_player/templates)
disable_symlinks off;
try_files $uri $uri/ /index.html;
# Return 404 for missing files instead of falling back to index.html
try_files $uri $uri/ =404;
# Cache static assets
location ~* \.(css|js|jpg|jpeg|png|gif|ico|svg|woff|woff2|ttf|eot)$ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment