[英]Using Google App Engine URL patterns to reach non-default service
According to [this doc][1] I should be able to reach a non-default service through URL patterns.根据 [this doc][1],我应该能够通过 URL 模式访问非默认服务。
I am using a custom domain.我正在使用自定义域。 (site.com) This is working to reach the default service.
(site.com) 这正在努力达到默认服务。
I want to reach a second, non-default service called my-service
.我想访问名为 m
my-service
的第二个非默认服务。
According to the docs, it seems like this is the way to do it:根据文档,这似乎是这样做的方法:
my-service.site.com
However, this isn't working.但是,这是行不通的。 I understand I can use a
dispatch.yaml
file, but I would like to set it up just by the URL's if possible.我知道我可以使用
dispatch.yaml
文件,但如果可能的话,我想只通过 URL 来设置它。
How do I set this up correctly?我该如何正确设置?
Edit: The exact error (url replaced) is this:编辑:确切的错误(替换了 url)是这样的:
This site can’t be reached
my-service.site.com’s server IP address could not be found.
[1]: https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed#default_routing
The URL pattern you are using is correct.您使用的 URL 模式是正确的。 This problem is a DNS issue for "site.com".
此问题是“site.com”的 DNS 问题。 It appears that while you have mapped "site.com" to App Engine, subdomains are not mapped to App Engine, thus the DNS lookup is failing.
看起来,虽然您已将“site.com”映射到 App Engine,但子域未映射到 App Engine,因此 DNS 查找失败。
You either need to ensure that you have a wildcard entry in place for site.com, eg:您需要确保为 site.com 设置了通配符条目,例如:
*.site.com. 3599 IN CNAME ghs.googlehosted.com.
Or map the specific service subdomain(s) to Google.或 map 到 Google 的特定服务子域。
my-service.site.com. 3599 IN CNAME ghs.googlehosted.com.
This maps requests to subdomains of "site.com" to Google's servers.这会将对“site.com”子域的请求映射到 Google 的服务器。
Further details are in the documentation here .更多详细信息在此处的文档中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.