Update nginx config: add health check, improve SPA fallback
This commit is contained in:
parent
7ff308751e
commit
3fb81019b4
1 changed files with 9 additions and 3 deletions
12
nginx.conf
12
nginx.conf
|
|
@ -1,12 +1,18 @@
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80 default_server;
|
||||||
server_name _;
|
server_name _;
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html;
|
index index.html;
|
||||||
|
|
||||||
# Serve static assets
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Disable logging for health checks
|
||||||
|
location = /health {
|
||||||
|
access_log off;
|
||||||
|
return 200 "OK";
|
||||||
|
add_header Content-Type text/plain;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Gzip compression
|
# Gzip compression
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue