Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

if I have several <Host> blocks in my server.xml like:

<Host name="" ...>

what would be the best way to stop/start/restart just one one them ?

I was using /bin/ stop and /bin/ start when I had only a single host but now I want to be able to handle each of them without affecting the other ones.

How would that differ if I had several applications running on the same Host and I wanted to restart just one of the applications ?

share|improve this question
up vote 1 down vote accepted

I don't think you can. If you've got several hosts configured in your server.xml, they'll all be tied to the running tomcat container (JVM) and you'll have to restart the whole lot of them if you restart one.

It's been a while, but back in the day we had lots of individual instances running on our servers, and we used custom start/stop scripts to host individual apps and their associated configuration separately (at least those that should be separate).

This helped keep our deployments scoped to a single container, as well as our management actions. You may consider doing something similar in your case, particularly if you want to be able to manage them separately like this - on the surface it seems like it would make sense for you to do something similar.

share|improve this answer
But then who is listening on what port? AFAIK only one "engine" can listen on a specific port - an what if I want to have an both run independently (i.e. can be independently restarted/upgraded) on the same machine with both using port 80? – epeleg Dec 21 '11 at 11:57
We (obviously) had separate ports bound to each instance. Apache with name-based vhosts and mod_proxy setup can easily forward to the backend tomcat instances on their respective ports, per site. – mcauth Dec 21 '11 at 23:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.