我正在使用App Engine Flexible环境,我在App Engine中部署了多项服务。所以我将多个子域连接到我的应用引擎。为了为每个服务分配一个子域,我定义了dispatch.yaml
文件。这是它的样子
dispatch:
- url: "wscfg.xxxxxxxxx.com/"
service: default
- url: "onboarding.xxxxxxxxx.com/"
service: default
- url: "dtnote.xxxxxxxxx.com/"
service: default
- url: "careco.xxxxxxxxx.com/"
service: careco
- url: "userman.xxxxxxxxx.com/"
service: user-management
将其部署到应用引擎后,它会显示dispatch.yaml
文件中指定的自定义域的服务。所以我的调度文件工作正常。
问题是,当我尝试访问https://careco.xxxxxxxxx.com/
时,它会将我带到default
服务,而https://user-management.xxxxxxxxx.com/
则会将我带到userman
服务(这是正确的)
答案 0 :(得分:1)
问题在于dispatch.yaml
文件。它最后需要有通配符。所以dispatch.yaml
应该看起来像
dispatch:
- url: "wscfg.xxxxxxxxx.com/*"
service: default
- url: "onboarding.xxxxxxxxx.com/*"
service: default
- url: "dtnote.xxxxxxxxx.com/*"
service: default
- url: "careco.xxxxxxxxx.com/*"
service: careco
- url: "userman.xxxxxxxxx.com/*"
service: user-management