po
This commit is contained in:
parent
96a1168822
commit
6469bb561a
1 changed files with 5 additions and 13 deletions
18
nginx.conf
18
nginx.conf
|
|
@ -1,25 +1,17 @@
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
root /usr/share/nginx/html;
|
server_name bymackie.com;
|
||||||
index index.html;
|
|
||||||
|
|
||||||
# Dedicated Health Check Endpoint
|
# Using the alias directive is the most reliable way to handle sub-paths
|
||||||
location /health {
|
# in an SPA without triggering port/path redirection loops
|
||||||
return 200 'healthy';
|
|
||||||
add_header Content-Type text/plain;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Your SPA routing (aliased to handle the sub-path)
|
|
||||||
location /lab/data-dashboard/ {
|
location /lab/data-dashboard/ {
|
||||||
alias /usr/share/nginx/html/;
|
alias /usr/share/nginx/html/;
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Fallback for the root domain
|
# SPA fallback for the root path
|
||||||
location / {
|
location / {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
|
|
||||||
gzip on;
|
|
||||||
gzip_types text/css application/javascript application/json;
|
|
||||||
}
|
}
|
||||||
Loading…
Add table
Reference in a new issue