dcsimg
Multiple domain names pointing at same tomcat
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Edward_surname
Posted On:   Saturday, September 10, 2005 07:08 AM

Hi group, Our Intranet is served up by a 4.1.27 tomcat (tomcat only). There are separate war's for separate depts (finance.war / hr.war etc). Currently, they are accessed via the URLs: http://intranet.company.com/finance/index.html http://intranet.company.com/hr/index.html The IP address of the server is 192.168.1.1 I'd like to create 2 DNS entries as follows: finance.company.com -> 192.168.1.1 hr.company.com -> 192.168.1.1 Is it possible to configure tomcat to see what URL has been used to access the intranet, and then serve up the appropriate app? Thanks, Edward    More>>

Hi group,


Our Intranet is served up by a 4.1.27 tomcat (tomcat only). There are separate war's for separate depts (finance.war / hr.war etc).


Currently, they are accessed via the URLs:

http://intranet.company.com/finance/index.html

http://intranet.company.com/hr/index.html


The IP address of the server is 192.168.1.1


I'd like to create 2 DNS entries as follows:

finance.company.com -> 192.168.1.1

hr.company.com -> 192.168.1.1


Is it possible to configure tomcat to see what URL has been used to access the intranet, and then serve up the appropriate app?


Thanks,


Edward

   <<Less

Re: Multiple domain names pointing at same tomcat

Posted By:   tim_fox  
Posted On:   Sunday, September 11, 2005 10:24 PM

I'm not sure that Tomcat can handle virtual servers on its own, but Apache certainly can. You can set up Apache to answer on any domain name you want by using the virtual server config and telling each virtual server that it needs to send JSP requests to Tomcat. That Tomcat will be whichever app directory is relevant to the virtual server. If you're interested, I can send you an Apache config for a virtual server that uses Tomcat as you describe. The only caveat is the you have to set up mod_jk to get Apache to talk to Tomcat and it isn't totally straightforward, but I could help you with that too.


Thanks


TGF

About | Sitemap | Contact