Do you know the normal methods for hosting multiple web applications on one tomcat?
One of the ways i'm able to think about doing the work is applying different context pathways for that different programs, but which makes the url look ugly for potential clients.
edit: i have to host different programs on one tomcat
The "standard" method of this option would be to front your tomcat instance by having an http server that may proxy either: 1. AJP - A binary protocol tight (therefore faster) than http. 2. Http
So that your virtual sites in apache react to bob.com and proxies to localhost:8080/bob and alice.com to localhost:8080/alice.
Search for mod_proxy mod_proxy_ajp paperwork and you ought to be set.
You will find lots of ways.
- Just deploy them on one instance.
- Install multiple cases of Tomcat on one server (e.g. required for some programs which require separated JVMs)
- create virtual hosts in tomcat and deploy every application as ROOT within an own virtual host
Not to mention you need to front your tomcat by having an apache server. Easiest way could be imho to make use of mod_proxy_ajp.
For multiple instances you are able to take a look here: http://wiki.v-collaborate.com/display/BLOG/2010/12/08/Install+Apache+Tomcat+7+on+ubuntu+and+debian?showComments=true
For that third way there's another publish on my small blog: http://wiki.v-collaborate.com/display/BLOG/2010/12/16/Configure+a+virtual+host+in+Apache+Tomcat+7 A great source can also be: http://confluence.atlassian.com/display/DOC/Guide+to+using+Apache+Tomcat%27s+Virtual+Hosts