如何将 Google App Engine 与我自己的裸域(不是子域)一起使用? [英] How to use Google App Engine with my own naked domain (not subdomain)?

查看:27
本文介绍了如何将 Google App Engine 与我自己的裸域(不是子域)一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在阅读和试验 DNS 记录数小时后,我可以通过以下网址访问我的 Google App Engine 应用:

After hours of reading about and experimenting with DNS records I can access my Google App Engine app via these URLs:

  • myappid.appspot.com
  • www.myappid.myowndomain.com

什么不起作用:

  • myowndomain.com
  • www.myowndomain.com

我希望能够直接从我的域而不是子域中提供我的应用程序.我见过这样做的应用程序.有没有办法在没有 URL 重定向的情况下做到这一点?

I want to be able to serve my app directly off my domain and not a subdomain. I've seen apps that do this. Is there any way to do this without a URL redirect?

推荐答案

[Update April 2016] 此答案现已过时,支持自定义裸域映射,请参阅 劳伦斯莫的回答.

[Update April 2016] This answer is now outdated, custom naked domain mapping is supported, see Lawrence Mok's answer.

我已经想通了!

首先:不可能将诸如 mydomain.com 之类的内容与您的 appspot 应用程序相关联.这被视为裸域,Google App Engine(不再支持)不支持该域.严格来说,我的问题的答案必须是不可能".继续阅读...

First off: it is impossible to link something like mydomain.com with your appspot app. This is considered a naked domain, which is not supported by Google App Engine (anymore). Strictly speaking, the answer to my question has to be "impossible". Read on...

您所能做的就是添加指向您的应用的子域,例如 myappid.mydomain.com.将顶级域链接到您的应用程序的关键是要意识到 www 和其他任何子域一样是一个子域!

All you can do is add subdomains pointing to your app, e.g myappid.mydomain.com. The key to get your top level domain linked to your app is to realize that www is a subdomain like any other!

myappid.mydomain.comwww.mydomain.com 的处理方式完全相同!

myappid.mydomain.com is treated exactly the same as www.mydomain.com!

步骤如下:

  1. 转到 appengine.google.com,打开您的应用
  2. 管理 > 版本 > 添加域...(您的域必须与您的 Google Apps 帐户相关联,请按照包括域验证在内的步骤进行操作.)
  3. 转到 www.google.com/a/yourdomain.com
  4. 仪表板 > 您的应用应在此处列出.点击它.
  5. myappid 设置页面 > 网址 > 添加新网址
  6. 只需输入 www 并点击添加
  7. 使用您的域托管服务提供商的网络界面,为您的域添加 www 的 CNAME 并指向 ghs.googlehosted.com
  1. Go to appengine.google.com, open your app
  2. Administration > Versions > Add Domain... (your domain has to be linked to your Google Apps account, follow the steps to do that including the domain verification.)
  3. Go to www.google.com/a/yourdomain.com
  4. Dashboard > your app should be listed here. Click on it.
  5. myappid settings page > Web address > Add new URL
  6. Simply enter www and click Add
  7. Using your domain hosting provider's web interface, add a CNAME for www for your domain and point to ghs.googlehosted.com

现在您已将 www.mydomain.com 链接到您的应用.

Now you have www.mydomain.com linked to your app.

我希望这在文档中更明显...祝你好运!

I wished this would have been more obvious in the documentation...Good luck!

这篇关于如何将 Google App Engine 与我自己的裸域(不是子域)一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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