This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes configure 2 host name in webserver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "configure 2 host name in webserver" Watch "configure 2 host name in webserver" New topic
Author

configure 2 host name in webserver

Nicky Eng
Ranch Hand

Joined: Mar 26, 2005
Posts: 378
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


From NickyEng
Diploma in Computer Studies
SCJP 1.4
SCWCD 1.4
Formula 1 app by Maxis (Playbook)
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

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

Joined: Mar 26, 2005
Posts: 378
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

Joined: Mar 06, 2001
Posts: 13459

I wouldn't, but then I have only considered it using the httpd/jk/tomcat method
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15961
    
  19

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

Customer surveys are for companies who didn't pay proper attention to begin with.
 
Consider Paul's rocket mass heater.
 
subject: configure 2 host name in webserver
 
Similar Threads
Apache & Tomcat problem
Problem with referencing session information from 2 contexts, one a subfolder of another
Help please...communication between web apps.
Tunneling Concept Query
Inheritance in EJB