Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat config issue

 
Jeremy Botha
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm in the process of speccing up a content management system for a private client. The client wants to be able to offer small business website hosting, and has approached me to write the CMS etc. No issues there.

What I want to do is write one web application, with the ability to dynamically add sites (within reason, I know one has to set up virtual hosts and the various DNS entries as well, but I want to try to automate the process as far as possible.)

What currently has me stumped is the following.

I want to deploy the CMS and backing system as www.blah.com

Now say my client signs another client, test.com. I want to be able to serve up test.com's website and CMS data from the main application servlet on blah.com.

I know that tomcat has support for Aliases inside the Host element in server.xml - but I'm hoping that someone here knows whether I can register an alias, say www.test.com, which Tomcat will automatically be able to redirect to say www.blah.com/main?site=<siteID> or something to that effect.

What I've seen so far is that I can run www.test.com and www.blah.com off the same webapp via Alias, but I can't find a way to encode the site id of www.test.com in the alias itself.

In effect, I want the site www.test.com to transparently use www.blah.com to serve its data.

Is this possible?

Mods - sorry if this is the wrong section, I thought that 'Servlets' would give me the best chance of finding answers.

thanks in advance
Jeremy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic