Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

configure 2 host name in webserver

 
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wouldn't, but then I have only considered it using the httpd/jk/tomcat method
 
Saloon Keeper
Posts: 24889
174
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic