Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

configure 2 host name in webserver

 
Nicky Eng
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have 2 host name : www.domain1.com , www.domain2.com

Both of them will be sharing the same server e.g. 111.12.123.123

I have 2 apps which named "app1" & "app2".

app1 is stored in 111.12.123.123's Tomcat5.5/webapps/

app2 is stored in another server 111.12.123.124's tomcat5.5/webapps/

My question is , what should i configure in tomcat5.5/conf/server.xml file to make www.domain2.com in 111.12.123.123 server to point to 'app2' homepage in 111.12.123.124 ?

I have tomcat in both server.

Please help...anyone ?
Thanks in advanced.

Regards
Nick

 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in my opinion you would be better with a single apache HTTPD instance serving both domains on a single IP and then using mod_jk workers to redirect to the tomcat instances
 
Nicky Eng
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Inside server.xml of Tomcat 5.5/conf/ I will have to put this in...is it correct ?

*Please look at Context part ...


 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wouldn't, but then I have only considered it using the httpd/jk/tomcat method
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18094
48
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The magic words are "Virtual Hosting", and I think they added it when I wasn't looking, since last time I wanted it, it wasn't this simple:

http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic