tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: RemoteHostValve for infinite domains? & Patch submit question...
Date Thu, 01 Apr 2010 15:31:26 GMT
Dean Hiller wrote:
...

> 
> I need "two"....one for requests xxxx.domain1.com and one for
> xxxx.domain2.com where xxxx is infinite combination.
> 
I think that you are right.  Based on the little I know about Java and 
Tomcat and RequestDispatcher, I would suggest a range of possible 
solutions, in my personal order of preference :

1) have a look at the urlrewrite filter at www.tuckey.org.
It may be able to do what you want.

2) use an Apache httpd with mod_rewrite and mod_proxy (or mod_jk) in 
front of Tomcat, as a proxy server listening on the IP address to which 
your hostnames resolve and port 80.
Set up Tomcat to listen on another port (e.g.8080), and configure it 
with one default Host (localhost), and two additional Hosts 
(www.domain1.com and www.domain2.com).
Use Apache's mod_rewrite to rewrite and proxy the calls to one or the 
other Tomcat Host(name), on the base of the domain ending of the 
original request.

3) get two different IP addresses for your server, and start 2 Tomcat 
instances, each one listening on one of these adresses.
Each one would then have a default host, which will answer on all names 
which resolve to that IP.
(Of course then you also need to split your two domains DNS-wise)

There are different variations mixing and matching the above bits and 
pieces.


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


Mime
View raw message