Last active
April 19, 2024 07:01
-
-
Save xinglongjizi/a9cfbcc1ced078de044c2b55ba9df01d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| # 其他的省略 | |
| # 应用部署在 xxx.com的子路径hiapmrolex下,用的是history路由模式,所有路由(除了配置的反向代理的路由)都返回index.html | |
| location / { | |
| try_files $uri $uri/ /hiapmrolex/index.html; | |
| } | |
| # try_files 可以解决任意路由 /*/**/* 都能返回指定的index.html 但是,如果任意路由加上.html后缀/*/**/*.html时 | |
| # nginx就会返回404,因此还要做404的处理,404返回指定的index.html | |
| error_page 404 /hiapmrolex/index.html; | |
| location /hiapmrolex/hiapm/ { | |
| proxy_pass https://hiapm.huawei.com/hiapm/; | |
| } | |
| location /hiapmrolex/cd-cloud-config/ { | |
| proxy_pass https://cloudconfigsvr.devmarket.gamma.dragon.tools.huawei.com/cd-cloud-config/; | |
| } | |
| location /hiapmrolex/nobug-widget/ { | |
| proxy_pass https://nobug.edevops.huawei.com/sre/widget/; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment