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:
Prerequisite:
- Also, please read the Python Tutorial for the development environment and pushing your app to Google server.
Steps:
Steps:
- Download the reverse proxy library (license: LGPL) in http://code.google.com/p/bs2grproxy/
- Modify bs2grpconfig.py
- set TARGET_HOST to your cloud foundry url
e.g. TARGET_HOST = "mvergel.cloudfoundry.com" - Modify app.yaml
- set your registered application id
- 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.
[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.