NGINX config - fix 404 error for SPA usage

This commit is contained in:
Philipp Dormann 2021-01-07 20:56:09 +01:00
parent 1f5057438f
commit 32e4f223f8

View File

@ -6,6 +6,9 @@ http {
server { server {
error_page 404 /index.html; error_page 404 /index.html;
root /usr/share/nginx/html; root /usr/share/nginx/html;
location / {
try_files $uri $uri/ /index.html;
}
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ { location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
expires 1y; expires 1y;
add_header Pragma public; add_header Pragma public;