From 6672b6257a98a0de2ec70e24ef1a0d1232d23df0 Mon Sep 17 00:00:00 2001 From: Zach Ahn Date: Thu, 2 Dec 2021 22:19:05 -0500 Subject: [PATCH] Respond with a 404 when the file doesn't exist Prior to this, I was seeing the successful HTTP status 200 when requesting files that did not exist. With this change, the server sends back Nginx's default 404 page instead of the home page. --- conf/app-nginx.conf.sigil | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/app-nginx.conf.sigil b/conf/app-nginx.conf.sigil index ccf5136..f9af43a 100644 --- a/conf/app-nginx.conf.sigil +++ b/conf/app-nginx.conf.sigil @@ -23,7 +23,7 @@ http { port_in_redirect off; location / { - try_files $uri $uri/ /index.html; + try_files $uri $uri/ =404; } } }