53 lines
1.4 KiB
Nginx Configuration File
53 lines
1.4 KiB
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name hyapp-platform.global-interaction.com _;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
location = /__frontend_healthz {
|
|
access_log off;
|
|
add_header Content-Type text/plain;
|
|
return 200 "ok\n";
|
|
}
|
|
|
|
location /api/ {
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_pass http://127.0.0.1:13100/api/;
|
|
}
|
|
|
|
location /ops-api/ {
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_pass http://127.0.0.1:13114/ops-api/;
|
|
}
|
|
|
|
location = /healthz {
|
|
proxy_pass http://127.0.0.1:13100/healthz;
|
|
}
|
|
|
|
location = /readyz {
|
|
proxy_pass http://127.0.0.1:13100/readyz;
|
|
}
|
|
|
|
location = /external-admin {
|
|
return 301 /external-admin/$is_args$args;
|
|
}
|
|
|
|
# 外管使用独立 HTML 入口;深链必须回退到自己的入口,不能落入主后台的 index.html。
|
|
location ^~ /external-admin/ {
|
|
try_files $uri $uri/ /external-admin/index.html;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
}
|