Hi,

if apache has the right idea, which hostname has been adressed and you
use mod_jk, usually you get the right redirects. If apache doesn't know,
because of ssl offloading or load balancers hiding the correct
information, you can set attributes on the tomcat side in server.xml to
the connector element.

The relevant attributes are documented in

http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html

Especially helpful in your situation are proxyName, proxyPort and
eventually scheme. Only one configuration is possible per connector.

Even if that helps: you should update to a more recent version of
tomcat, apache and most likely mod_jk. 5.5.9 is *very* outdated and a
lot of bug fixes went into 5.5 since that time. Also: if your mod_jk is
as old as Apache and Tomcat you will profit from an update to 1.2.19. At
last even for Apache there have ben a couple of (security) fixes since
2.0.46 (at the moment 2.0.59).

Regards,

Rainer

Ashley Hayes schrieb:
> Hi all,
>    We use tomcat's formbased authentication (post to /j_security_check), the
> bases of which is a HTTP 302 redirect on success.
> 
> We have a problem because tomcat/mod jk is issuing a full URL to the client
> that points at an internal ( private) IP/server - as opposed to the public
> IP/domain name that the user has in their browser. E.g.
> 
> ________________HTTP Request _______________
> 
> POST /topup/j_security_check HTTP/1.1
> Host: samplepublicdomain.com
> ....
> 
> _______________HTTP Response _______________
> 
> HTTP/1.1 302 Moved Temporarily
> Date: Fri, 06 Oct 2006 09:39:38 GMT
> Server: Apache/2.0.46 (Red Hat)
> Location: http://192.168.50.110/test/
> .....
> __________________________________________
> 
> 
> 
> We need the redirect url to be  http://samplepublicdomain.com/test/
> 
> 
> Our configuration is: 2 apache httpd servers connected with mod jk (in
> loadbalance mode with stick sessions) to 2 tomcat servers.
> 1. I've tried apache httpd.conf "ServerName samplepublicdomain.com:80" 
> 2. I've tried tomcat server.xml setting <Host
> name="samplepublicdomain.com"....>
> 
> For those who think they can help please find more details below.
> Any suggestion would be much appreciated,
> Kind regards,
> Ashley 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Server network schematic ( I hope this comes out ok)
> 
>       
>                 __ Apache/2.0.46 ----------------> Tomcat5.5.9
>                /    (private IP1  \    />           (private IP1 )
>               /       HTTP port 80)\  /               mod-jk port 8009
> Loadbalancer /                      \/
> (public IP - \                      /\
> on port 80)   \                    /  \>
>                \__ Apache/2.0.46 ---------------> Tomcat5.5.9
>                    (private IP2                    (private IP2
>                      HTTP port 80)                    mod-jk port 8009)
> 
> 
>  
> Note - to simulate a hardware load balancer that will be used in production,
> I have configured a separate apache on a machine with a public IP that uses
> mod_proxy_balancer, but I do not think this is the issue.
> 
> 
> 
> 
> The configuration all works except for redirects, gggrrrrrr....
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to