On Sun, 17 Nov 2002, Brandon Cruz wrote:
> Date: Sun, 17 Nov 2002 15:44:12 -0600 > From: Brandon Cruz <[EMAIL PROTECTED]> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]> > To: Tomcat Users List <[EMAIL PROTECTED]> > Subject: Can all vhosts share one Webapp? > > Can I have all my virtual hosts share one webapp? I would like to avoid > having to declare a context for every single virtual host. You can do this by taking advantage of the "defaultHost" attribute on the <Engine> element. If a request comes into Tomcat with an unrecognized host name, it is assigned automatically to the <Host> element that is speicified by defaultHost. The out-of-the-box configuration uses this technique to assign all requests for all virtual hosts to the <Host> named "localhost", which is the single set of webapps nested inside that host. > This causes way > too many threads on startup and slows the system down. > Unless you are starting threads in your own servlets, the number of host elements and webapps has neglible impact on the number of threads that Tomcat starts. That is driven primarily by how you configure your <Connector> elements; and the connector threads that process requests are shared across all the hosts and webapps. > Any ideas? We are using tomcat 4.1.12 and apache 1.3.26. The above info is about the Tomcat side of things -- you'll need to ask someone else about the Apache connector configuration for this to work. > > Thanks! > > Brandon Craig -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>