• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

Tomcat Virtual Servers like Apache 2.0 possible?

 
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have recently upgraded to Apache 2.0 and just setup Virtual Servers where I can have my main domain point to one directory structure and have another domain point to a completely different directory structure.
I have searched around on Apache's site but cannot seem to find out if Tomcat supports Virtual Servers.
If it does, I think that my only option would be to run Tomcat solely since it would also be on Port 80 and just run all of my HTML services through Tomcat instead of through Apache.
If it does not work, does anyone have any suggestions as to how I could tweak Apache to point to the Tomcat server? I guess I could make all of my links go to a different Port used for Tomcat, but I'd rather leave it all port 80.
I am running Tomcat 4.1.18 but am willing to upgrade to Tomcat 5.0 if I need to.
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is this what you need?

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html
 
Jeff Grant
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think that might just be what I was looking for as it looks just like Virtual Hosts with Apache2.
Thanks!
 
Jeff Grant
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have attempted that setup which was linked. However, I cannot seem to get it to work with Tomcat.
Could anyone please give me a simple example which includes a "default.com" domain and a path being "c:\temp"
This would be much apprecaited. I assume it would be listed after the </host> for the "localhost" default definition.
Thanks.
 
Jeff Grant
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anyone? Any help would be appreciated!
 
Jeff Grant
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So no one's done this huh..
 
Jeff Grant
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I finally figured it out with the help of Google and some tweaking here and there.
Here is a sample of what you would place in your server.xml file for a domain by the name of "test1.com". If you want to access "www.test1.com", you would need to copy and paste this, changing the name="test1.com" to name="www.test1.com".
Here is the path which my Test1 points C:\Server\Tomcat 4.1\webapps\Test1 physically on my server. I assume you can place it elsewhere, but this took the least amount of tweaking so I just left it in the webapps directory.

Be sure to include the same WEB-INF folder that is in your ROOT folder.. modifying it as necessary.
 
We noticed he had no friends. So we gave him this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic