Reputation: 1263
I have Two spring MVC web application(app1.war & app2.war), and both share the same DB. Now I want host them on any cloud based hosting site(openshift, amazon etc.). Here I want to host both inside one domain.
suppose my host name is - www.abc.com so
Please let me know, if it can possible,And How It can be done. Also where any hosting site also supporting this.
Upvotes: 0
Views: 78
Reputation: 6136
You can easily achieve this by configuring your domain properly.
Note that abc.com and spath.abc.com can be used to run two different websites. You will need to configure your domain's CNAME section and add a sub-domain there.
Once that is done you can configure Apache Tomcat's Host Name. Taking DigitalOcean as your cloud provider, you can configure this easily by changing Tomcat configuration.
You can then point abc.com to your app1.war
and spath.abc.com to app2.war
Kindly comment if you face any issues. I'll be happy to help you out here.
Upvotes: 1