cloudfoundry 反向代理 域名绑定

Currently, Cloud Foundry (CF) doesn't support mapping of external URL's (See discussion).  The workaround is to use a reverse proxy. For this job, I hosted it Google App Engine (GAE) and used BS2 GAE Reverse Proxy. Credits to yufeiwu for the free reverse proxy app.

Prerequisite:

GAE account
- Also, please read the  Python Tutorial  for the development environment and pushing your app to Google server.

Steps :
  1. Download the reverse proxy library (license: LGPL) in http://code.google.com/p/bs2grproxy/
  2. Modify bs2grpconfig.py
    • set TARGET_HOST to your cloud foundry url
      e.g. TARGET_HOST = "mvergel.cloudfoundry.com"
  3. Modify app.yaml
    • set your registered application id
  4. Push the app and make it live

I will continue to use this approach for  my website  until CF have a proper DNS support.

[UPDATE]  Many are encountering a problem with the session using this method.  There is a patch  that fixes this issue. Thank you Marius Anton for the information.


你可能感兴趣的:(反向代理,CloudFoundry,域名绑定)