0

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

issues.mydomain.com would take you to www.mydomain.com/jira
wiki.mydomain.com would take you to www.mydomain.com/xwiki
vcs.mydomain.com would take you to www.mydomain.com/svn

...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.

Thanks!

1 Answer 1

0

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).

1
  • Thanks for the reply, Nils, but those answers are outside the bounds of my question.
    – Syndog
    Jul 18, 2011 at 11:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .