can a custom domain be pointed a specific google a

2019-04-19 10:33发布

an App Engine app can be deployed with a specific version ID http://code.google.com/appengine/docs/python/config/appconfig.html

such that if the original app has this default domain: myapp.appspot.com

and you can point your own custom domain to this using Google Apps www.myapp.com --> (CNAME) myapp.appspot.com

BUT you can also upload a version identifier with your app and access it like this: newversion.myapp.appspot.com

What I am wondering is if it is possible to hook up a custom domain to this non-default version of the app? v2.myapp.com --> newversion.myapp.appspot.com ??

I dont think this is supported... but was hoping someone could verify (because I can't find any hard documentation saying "no you cant do this")


EDIT: if you're stumbling upon this... you can use the dispatch.yaml file to point to specific SERVICE but not VERSION... so there is still no "built-in" solution for this as of the end of 2017

6条回答
SAY GOODBYE
2楼-- · 2019-04-19 11:07

This answer worked for me:

Add a CNAME entry in your DNS configuration with ALIAS v2 and HOST ghs.googlehosted.com

Modify the dispatch file:

dispatch:

    - url: "v2.myapp.com/*"
      module: webmodule

More info here:

https://developers.google.com/appengine/docs/python/modules/routing

查看更多
小情绪 Triste *
3楼-- · 2019-04-19 11:11

Perhaps not the final official word, but there is an accepted bug report on Google App Engine (GAE) which seems to be related to your question. If I understood your question (and the bug report) correctly, the answer would be that it's not currently possible to point a sub-domain to a specific custom version of your app on GAE.

See the bug report here:

http://code.google.com/p/googleappengine/issues/detail?id=2878

The bug is in the context of Facebook Connect and testing, but comments seem to indicate a wider issue with the inability for GAE to have a custom domain point to a specified version of one's app.

See also the Google Groups thread (linked from the bug report) here:

http://groups.google.com/group/google-appengine/browse_thread/thread/3e85fc4ae426a46f

查看更多
姐就是有狂的资本
4楼-- · 2019-04-19 11:12

I'd like this feature, too. But it's not possible right now. I'd be a nice feature for beta testing. Right now, I deploy each version two times, first as beta version for beta testing and second as version number (for example 12020a) for default version switching.

查看更多
Rolldiameter
5楼-- · 2019-04-19 11:21

This has just become available: GAE version 1.6.3 will include feature to map custom domain to a specific version of an app.

https://groups.google.com/forum/m/#!topic/google-appengine/detHVsR2Y5I/discussion

查看更多
混吃等死
6楼-- · 2019-04-19 11:22

No, it's not. I tried to do this recently and after banging my head against it came to the conclusion that you can not do this.

查看更多
一夜七次
7楼-- · 2019-04-19 11:27

I just gave this a try and I now have the following setup:

  • CNAME record: *.example.com. -> ghs.google.com.
  • Mapped *.example.com in Google Apps to my App Engine application

Now when I go to http://versionA.example.com/ it serves up versionA (previously this was found at http://versionA.myappid.appspot.com/).

Apparently you can do fancier things like http://versionA.appengine.example.com by using *.appengine.example.com instead of *.example.com.

See https://developers.google.com/appengine/docs/domain and scroll down to "More About Wildcard Subdomain Mapping"

查看更多
登录 后发表回答