-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add nginx config to prevent 404 on page refresh
- Loading branch information
Showing
2 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
events { } | ||
http { | ||
|
||
include mime.types; | ||
sendfile on; | ||
|
||
server { | ||
listen 24900; | ||
listen [::]:24900; | ||
server_name localhost; | ||
|
||
#error_page 404 /404.html; | ||
root /usr/share/nginx/html; | ||
|
||
# direct all traffic to index.html for client-side SPA routing | ||
location / { | ||
try_files $uri $uri/ /index.html; | ||
} | ||
|
||
# redirect server error pages to the static page /50x.html | ||
# | ||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
} | ||
|
||
} |