tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Hiller <dean.hil...@gmail.com>
Subject Re: RemoteHostValve for infinite domains? & Patch submit question...
Date Thu, 01 Apr 2010 16:45:04 GMT
yes, I have thought through all those actually.  Was just talking about
urlrewrite filter and apache this morning.  Issue with that then is having
to keep their company name in a param of every single redirect seam does
which is not the easiest of things to do....that way, company could be put
in front <company>.domain.com.

I like the ip idea(except for needing two tomcats).

Two services in tomcat doesn't work as then we would need different ports
which is definintely not something we want.

I decided I am going to go the route of finding that Host matching code
which probably looks up in a map of domain to Host object to route request
to the Host/Engine(*which file is that in so I can jump to it?*), and just
loop through it instead with endsWith.  *hmmm, too bad there is not a
pluggable component to Service or something or whoever owns the lookup like
in server.xml lookupClass="com.alvazan.tomcat.LookupHost" or something*?  I
could certainly provide a patch so people could plug into tomcat what they
like based on performance considerations...ie. endsWith loop is not the best
if you have 400 domains on one tomcat.

Dean

On Thu, Apr 1, 2010 at 9:31 AM, André Warnier <aw@ice-sa.com> wrote:

> 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.comand
> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message