can a custom domain be pointed a specific google app engine version domain?

我怕爱的太早我们不能终老 提交于 2019-12-10 01:21:23

问题


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


回答1:


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




回答2:


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




回答3:


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"




回答4:


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




回答5:


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.




回答6:


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.



来源:https://stackoverflow.com/questions/9283056/can-a-custom-domain-be-pointed-a-specific-google-app-engine-version-domain

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!