A DotCloud stack that turns a PHP service into a HTTP reverse proxy
Switch branches/tags
Nothing to show
Pull request Compare This branch is even with lopter:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


HTTP Proxy Tricks on DotCloud

This repository shows how to setup a HTTP reverse proxy in a DotCloud application.

You can deploy it on DotCloud with:

git clone git://github.com/lopter/proxytricks-on-dotcloud proxytricks
dotcloud push proxytricks proxytricks-on-dotcloud

This trick can be used when you want to point different parts of your URI space to different DotCloud services.

In this example all URIs that starts with /blog/ are redirected to a blog service. Everything else is redirected to the app service

                +-------+          o-----o
                |       |          |     |
HTTP Requests --> proxy ---+- /* --> app |
                |       |   \      |     |
                +-------+    \     o-----o o------o
                              \            |      |
                               `- /blog/* -> blog |
                                           |      |

However this solution is not really advised on the DotCloud platform for three reasons:

  1. It adds a service only to route HTTP traffic (expensive);
  2. It's difficult to set up;
  3. It further adds latency (on DotCloud HTTP traffic goes already at least through one reverse proxy and two in the case of SSL).

That's why, whenever possible, your are advised to use sub domains, e.g: blog.dotcloud.com.