From 32e4f223f89d2b58ffc2466aded008fa1c948290 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Thu, 7 Jan 2021 20:56:09 +0100 Subject: [PATCH] NGINX config - fix 404 error for SPA usage --- nginx.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nginx.conf b/nginx.conf index 6b303921..36407b4b 100644 --- a/nginx.conf +++ b/nginx.conf @@ -6,6 +6,9 @@ http { server { error_page 404 /index.html; root /usr/share/nginx/html; + location / { + try_files $uri $uri/ /index.html; + } location ~* \.(?:ico|css|js|gif|jpe?g|png)$ { expires 1y; add_header Pragma public;