使用Google App Engine URL模式获得非默认服务 [英] Using Google App Engine URL patterns to reach non-default service

查看:94
本文介绍了使用Google App Engine URL模式获得非默认服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据[this doc] [1],我应该能够通过URL模式获得非默认服务.

According to [this doc][1] I should be able to reach a non-default service through URL patterns.

我正在使用自定义域. (site.com)正在努力获得默认服务.

I am using a custom domain. (site.com) This is working to reach the default service.

我想获得另一个名为my-service的非默认服务.

I want to reach a second, non-default service called my-service.

根据文档,看来这是这样做的方法:

According to the docs, it seems like this is the way to do it:

my-service.site.com

但是,这不起作用.我知道我可以使用dispatch.yaml文件,但如果可能的话,我想仅通过URL进行设置.

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.

如何正确设置?

确切的错误(替换为URL)是这样的:

The exact error (url replaced) is this:

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

推荐答案

您使用的网址格式正确.此问题是"site.com"的DNS问题.看来,虽然已将"site.com"映射到App Engine,但子域没有映射到App Engine,因此DNS查找失败.

The URL pattern you are using is correct. This problem is a DNS issue for "site.com". 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设置了通配符条目,例如:

You either need to ensure that you have a wildcard entry in place for site.com, eg:

*.site.com.  3599    IN      CNAME   ghs.googlehosted.com.

或将特定的服务子域映射到Google.

Or map the specific service subdomain(s) to Google.

my-service.site.com.  3599    IN      CNAME   ghs.googlehosted.com.

这会将请求映射到"site.com"的子域到Google的服务器.

This maps requests to subdomains of "site.com" to Google's servers.

更多详细信息在文档此处.

这篇关于使用Google App Engine URL模式获得非默认服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆