On Jul 25, 2013, at 1:53 PM, Brian Martin <
bkma...@gmail.com> wrote:
> When deploying an application to CloudFoundry, usually an application maps to a hostname. For example,
>
>
service.attheextreme.com -> service.war
>
help.attheextreme.com -> help.war
>
> I'm interested in the following URI structure with separately deployed applications:
>
>
attheextreme.com/service
>
attheextreme.com/help
>
> What is the motivation for the above structure:
> 1. Need to maintain separate deployments per application (potentially on different runtimes (jee, node.js, ruby, etc)
> 2. Want to avoid CORS complexity with Same Origin Policy for JavaScript.
>
> Is it possible to deployment independent applications to the same host with different context roots?
As far as I understand, when you push you have to map your application to a specific host on a specific domain and that has to be unique. When you push an application, all of the build packs that I've worked with assume that the pushed application is being deployed to the root of the assigned URL. For example, when you push a Java application it's deployed as the ROOT context in Tomcat, which means a request to
http://attheextreme.com/service is going to go to the root application and look for a servlet mapped to "/service".
If you can't combine your application into one application, one possibility / hack that comes to mind would be to push service to
service.attheextreme.com and help to
help.attheextreme.com and then push a third app that acts as a reverse proxy and maps
www.attheextreme.com/service to
service.attheextreme.com and
www.attheextreme.com/help to
help.attheextreme.com.
> If not, is there any consideration for this feature in the future?
Sounds interesting to me. Hoping someone else can comment.
Dan