tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Turner, John" <>
Subject RE: can tomcat do dynamic virtual hosts?
Date Mon, 06 Jan 2003 00:14:47 GMT

-----Original Message-----
From: Joseph Shraibman [] 
Sent: Sunday, January 05, 2003 3:58 PM
To: Tomcat Users List
Subject: Re: can tomcat do dynamic virtual hosts?

>> Sorry, I have no idea what that means.
> Somtimes you want and to be in the same webapp

That's what <Alias> is for.

>> that Tomcat has to do and more configuration overhead required or 
>> possible (Realms, etc).  You can auto-deploy a Context.
> How?  If I want to add a new Context don't I have to restart tomcat to
reread the 
> server.xml file.

Yes, this has already been discussed in this thread.  Craig pointed out that
picking up config changes without restarts is something being discussed for
Tomcat 5.  Perhaps, if it is that vital to you, you might want to subscribe
to tomcat-dev and get in on the discussion to voice your views.

>> restart anyway (see Craig's comments on possible future ability to 
>> pick up config changes on-the-fly without a restart):
> That's my point. In apache it doesn't need a restart.

I have no idea what you mean.  Apache most certainly does need a restart to
pickup changes in httpd.conf.  You either use "restart" or "graceful" for it
to get changes.  Yes, it's not a full stop and a full start, but even with
"restart" and "graceful", any current connections are either cut off
prematurely (restart) or allowed to finish (graceful) before httpd.conf is

>> Since you have a restart, a new mod_jk.conf file is generated, and it 
>> will have the new Host information in it.
> I gave up on autogeneration.

OK...I'm not really sure what that has to do with anything.  An Apache
restart is required whether you use auto-generation of JK configuration or
not, since using JK requires changes to httpd.conf (see my comments above).

>> Host and web app config listed above), and then does a start on the 
>> new Tomcat.
> Distinct tomcat? That would mean a different port for each tomcat, plus
the overhead (90 
> megs of memory on my test machine)

Well, this has been discussed before on the list.  In my opinion, using an
extra port and some more RAM is well worth the extra advantages you get in
administration.  You might want to rethink the're going to
run out of RAM and CPU long before you run out of ports, and being low on
RAM is a very easy (and cheap) problem to solve.  I'm currently running 22
Tomcats, from low traffic to high traffic, on one of my servers. Granted, I
didn't design the original setup, but after many months of analyzing the
efforts of those who did, and building on it, I'm convinced it was the right
way to go and I won't be doing it any differently in the future.  There are
zero user complaints, and as the administrator it's a piece of cake to work
with one Tomcat (or create new ones or delete old ones) without affecting
anyone else. One web application hang doesn't touch anyone else, for
example.  In an ISP/ASP scenario, I would think that's exactly the type of
behavior you would want, but maybe I'm wrong.  

Are you planning to resell Tomcat somehow?  If I was your customer, and you
told me my app was down because somebody else's webapp was causing problems,
I wouldn't be a customer for long.

Basically, it sounds like you want everything to magically happen by putting
a couple wildcard statements somewhere.  Don't you think that's an
unreasonable expectation?  If you're selling Tomcat hosting, it's piece of
cake to justify the extra expense in managing it to your customers.  I've
only seen one hoster offering Tomcat 4 for less than $40/month/account.

>> Maybe I'm just a tree stump, but I haven't seen you propose a case 
>> that can't be handled.
> The case where tomcat works with my Apache dynamic virtual hosts. Apache
doesn't *need* 
> dynamic virtual hosts either, you could just use a lost of virtual hosts.
It would be nice 
> if tomcat supported the same thing.

Well, then I suggest you bust out some code to make it do that.  I don't see
any need for it in Tomcat, and it looks like the dev team doesn't either.
Perhaps they need to hear your point of view.  In my mind, Tomcat is a
deluxe service, not a throwaway service like Tripod or Geocities or
whatever...justifying the increase in cost, assuming that you plan to resell
the service, is a pretty easy thing to do.  

As I said before, it's a pretty trivial matter to write a script that will
setup virtual hosting with Tomcat just about as easily as you can do it, and
so far the only downside is using an extra port or two and using some RAM.
I don't think those are downsides at all given the tradeoff.


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message