简体   繁体   中英

One Domain with Multiple War

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

  • abc.com --> will refer app1
  • spath .abc.com --> will refer app2

Please let me know, if it can possible,And How It can be done. Also where any hosting site also supporting this.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM