多个自定义域到特定版本的Google App Engine应用 [英] Multiple custom domains to specific version of Google App Engine app

查看:59
本文介绍了多个自定义域到特定版本的Google App Engine应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有 myapp.appspot.com 和两个分别称为 foo.com bar.com 的自定义域.如何配置Google App Engine(GAE),以便:

Let's say I have myapp.appspot.com and two custom domains respectively called foo.com and bar.com. How do I configure Google App Engine (GAE) such that:

(www.)foo.com-> foo .myapp.appspot.com

(www.)foo.com -> foo.myapp.appspot.com

(www.)bar.com-> bar .myapp.appspot.com

(www.)bar.com -> bar.myapp.appspot.com

(www.)foo.com->myapp.appspot.com(默认版本)

(www.)foo.com -> myapp.appspot.com (default version)

我正在阅读 https://developers.google.com/appengine/docs/domain,但我仍然不知道如何配置它.我觉得GAE仅支持一个自定义域的通配符,例如 **.foo.com .

I'm reading https://developers.google.com/appengine/docs/domain but I still don't understand how to configure it. I get the impression that GAE only supports wildcard for one custom domain e.g. **.foo.com.

推荐答案

您无法真正直接做到这一点,因为您将自定义域与应用ID而不是应用URL关联了.

You can't really do that directly, as you associate your custom domain with an App ID rather than the App URL.

我想您可以将foo.com和bar.com都映射到您的App ID,然后在App Engine的默认版本中解析URL并进行相应的重定向,但这不是一个很好的解决方案,因为您将从您的自定义域返回到appspot.com域.

I guess you could map both foo.com and bar.com to your App ID, then in the default version of your App Engine parse the URL, and redirect accordingly, but it's not a great solution as you would be redirecting from your custom domain back to appspot.com domain.

这篇关于多个自定义域到特定版本的Google App Engine应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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