tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Shevett <>
Subject "High Level" question. Managing dynamic vhost deployments...
Date Thu, 26 Apr 2012 19:44:32 GMT
Hey folks - I've gotten great help on the list before, I'm looking for 
some guidance on how to approach this...

I have a hosted service that deploys / provisions vhosts running a 
prepackaged .war app.  I'd like to be able to 'spin up' a vhost on the 
fly, without restarting tomcat.

What I'm doing now is:
* Create a directory in /etc/tomcat6/Catalina/vhostname/
* Create a ROOT.xml in that dir that has <Context 
docBase=[sharedwarfilename]...> for the vhost
* Edit server.xml to make a new Host entry
* Restart tomcat

The app goes live (there's an Apache httpd front end with a wildcard on 
the domain that's using ajp: connections to Tomcat, so will look for a vhost of that name on the Tomcat server).

This works, but is a pain because it requires a tomcat restart and a 
manual file edit.

What I want to do be able to do is bring up a vhost, maybe via the 
Tomcat manager, without doing a restart.  I can deploy a .war file easy, 
but the vhost entry wouldn't wake up.

My understanding is I can make the vhosts go active via a script or tool 
that uses JMX calls to Tomcat to configure up the vhost, but my 
understanding is this configuration is mutable - if Tomcat restarts, all 
the vhost configurations disappear, and I have to 'reprovision it'.

Is it possible to spin up and down vhosts like this without restarting 
tomcat, and if so, what's the preferred methodology that makes it 
reproduceable, if the configuration is only in memory, and will 
disappear if/when tomcat restarts?

Thanks very much!


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

View raw message