Files
inkreach-official-website/deploy/nginx/admin.v2.conf
T

35 lines
832 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# v2 部署本地化:这个 nginx 容器只负责把 /v2/admin/ 下的 SPA 静态文件吐出去
# 对外分流由现网 deploy-admin-1 的 nginx 完成(/v2/admin/ 原样透传、/v2-api/ 转发到 v2 api
server {
listen 80;
server_name _;
client_max_body_size 10m;
root /usr/share/nginx/html;
location = /v2 {
return 301 /v2/admin/;
}
location /v2/admin/ {
try_files $uri $uri/ /v2/admin/index.html;
}
# v2 版 H5(构建时 router.base 必须为 /v2/h5/,产物放 /usr/share/nginx/html/v2/h5
location = /v2/h5 {
return 301 /v2/h5/;
}
location = /v2/h5/index.html {
add_header Cache-Control "no-cache";
}
location /v2/h5/ {
try_files $uri $uri/ /v2/h5/index.html;
}
location / {
return 404;
}
}