On 31/07/2010 04:36, Andrew Knight wrote:
Hi,

I've got a general configuration question for Tomcat 6. I've read the
documentation and done a bit of searching but could not find a solution. I'm
looking to set up the following:

International site: widgets.com

Local sites like: widgets.com/au, widgets.com/uk etc

An alias for widgets.com.au to widgets.com/au and an alias for widgets.co.uk to
widgets.com/uk etc for 27 countries

The idea is to have a seamless transition from domestic sites to directories
on a central site, but have the local market sites appear to function as
independent sites. We already have 27 local sites that have been in existence
for a long while and are well known to our customers.

I thought that it could be solved by setting up the local sites like
widgets.com.au as virtual hosts resolving to the appropriate directory but the
documentation states "Note that the directory structures under the appBase for
each host should not overlap each other.". What are the issues when the
directory structures of virtual hosts overlap?

Multiple deployments - particularly problematic if WARs are being used. It is complicated by the fact that there is a fundamental different between docBase and appBase. It is not a simple directory structure.

If this was just static content, a lot of the issues can be side-stepped but as soon as you use WARS and/or dynamic content things get trickier.

I assume that you don't want to put in place a simple redirect from widgets.com.au to widgets.com/au

One option that keeps the appearance of separate sites would be:
- set up Tomcat to server widgets.com, widgets.com/uk, etc
- use a reverse proxy (eg httpd)
- configure the reverse proxy to proxy widgets.com.uk and widgets.com/uk to /uk on the Tomcat server

Another option might be to set up a single host on Tomcat for widgets.com with aliases for all the other hosts and then add a filter that checks the host header and forwards the request to the right context.

Note, YMMV - I haven't tested any of the above.

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to