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 {
|
||||
listen 80;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
server_name bymackie.com;
|
||||
|
||||
# Dedicated Health Check Endpoint
|
||||
location /health {
|
||||
return 200 'healthy';
|
||||
add_header Content-Type text/plain;
|
||||
}
|
||||
|
||||
# Your SPA routing (aliased to handle the sub-path)
|
||||
# Using the alias directive is the most reliable way to handle sub-paths
|
||||
# in an SPA without triggering port/path redirection loops
|
||||
location /lab/data-dashboard/ {
|
||||
alias /usr/share/nginx/html/;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# Fallback for the root domain
|
||||
# SPA fallback for the root path
|
||||
location / {
|
||||
root /usr/share/nginx/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