I am trying to use CloudBees PaaS (RUN@CloudBees) to consolidate essentially three different distinct uses under the same URL space:
- root (/) main landing, marketing page
- app (/app) java app running in CloudBees
- blog (/blog) another java app running in cloudbees or possibly outside (example.wordpress.com)
If I was doing it myself in a datacenter or in AWS I would setup a reverse proxy (possibly like Varnish and configure reverse proxy to map the URL space as follows:
- root (/): http://www.example.com/ –> CMS running as cloudbees app example-cms.cloudbees.net
- app (/app) java app running in CloudBees http://www.example.com/app -> app.example.com
- blog (/blog) similarly http://www.example.com/blog -> example.wordpress.com or exampleblog.cloudbees.net
How can I achieve the same with CloudBees. Can it be done? Is this too much to expect from a PaaS vendor?
An interesting problem, and a few solutions:
My preference would always be for number 1 – DNS is a great way to do things like this.
You can with this approach have /blog similar Urls in your paas application, and have it do a 302 redirect to the real blog.example.com – that kind of gives you a bit of both.