Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

Say I have a virtual host set up in Tomcat for "" and I want to direct my sub-domains to particular contexts in the virtual host. For example... would take you to would take you to would take you to

...and so on.

I'm hoping there's a slick way to do this, perhaps with the <Alias> tag without having to create a virtual host for every sub-domain I want to handle. Or if there's a completely different solution, I'm all ears.


share|improve this question

Use httpd apache in front of your Tomcat!

That way you could use a named virtual host and direct it to your Tomcat-Application. It is also more secure since you can forbid any other path within that VHost.

You also don't have to expose your Tomcat to the network at all: Bind it to localhost and use mod_jk or mod_proxy_ajp (the first ist better suited for heavy load) to connect to Tomcat via AJP (normally TCP 8009).

share|improve this answer
Thanks for the reply, Nils, but those answers are outside the bounds of my question. – Syndog Jul 18 '11 at 11:22

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.