You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jes Kasper Klittum <je...@enavn.com> on 2006/04/27 09:33:06 UTC

vsite config files on Tomcat 5.5 - including in server.xml?

I am configuring Tomcat 5.5 with mod_jk on a test server running  
CenOS 4.3 and apache 2.0, and need the ability to choose what virtual  
sites should be able to execute servlets and JSP. For this I need an  
easy way to enable and disable Tomcat for a given site, but it seems  
that it is not possible to make specific site configs that are  
included in the server.xml dynamically.

I have been scovering the web for info om this subject, but I have  
not yet found any hints as to how this is done. Google provides me  
with a lot of info about including apache config files, but I know of  
this already. The Tomcat docs and FAQ did not provide the answer either.

I then tried putting this line in the server.xml file:

include /var/tomcatconf/sites.xml.d/

hoping that all sitexx.xml files in this dir would then be loaded  
into Tomcat at runtime, but to no avail.

Would this be possible or should all vsite configs be injected  
directly in the server.xml file?

I would appreciate any help with this issue. :)

Best regards,

Jes Kasper Klittum
jes@enavn.dk



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: vsite config files on Tomcat 5.5 - including in server.xml?

Posted by Tim Funk <fu...@joedog.org>.
Since the jsp servlet is registered globally - all vhosts inside tomcat will 
be able to run jsp's.

But since you are using apache in front of tomcat - you can decide which 
requests get routed to tomcat and which do not. (Via your apache config)

As for configuring tomcat with virtual hosts - all the vhost definitions are 
defined in server.xml. You can kludge around this by using XML entities - but 
at best it probably doesn't solve the include/* issue.

-Tim

Jes Kasper Klittum wrote:
> I am configuring Tomcat 5.5 with mod_jk on a test server running  CenOS 
> 4.3 and apache 2.0, and need the ability to choose what virtual  sites 
> should be able to execute servlets and JSP. For this I need an  easy way 
> to enable and disable Tomcat for a given site, but it seems  that it is 
> not possible to make specific site configs that are  included in the 
> server.xml dynamically.
> 
> I have been scovering the web for info om this subject, but I have  not 
> yet found any hints as to how this is done. Google provides me  with a 
> lot of info about including apache config files, but I know of  this 
> already. The Tomcat docs and FAQ did not provide the answer either.
> 
> I then tried putting this line in the server.xml file:
> 
> include /var/tomcatconf/sites.xml.d/
> 
> hoping that all sitexx.xml files in this dir would then be loaded  into 
> Tomcat at runtime, but to no avail.
> 
> Would this be possible or should all vsite configs be injected  directly 
> in the server.xml file?
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org