tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian Dunn" <>
Subject Re: need help with Tomcat-generated redirects
Date Wed, 02 Jan 2008 22:00:36 GMT
>>> On Wed, Jan 2, 2008 at  4:48 PM, Rainer Jung <> wrote:

>> I have some applications running under a Tomcat installation set up
>> in this way:
>> [load balancer on port 80] ---> [Apache server on port 5001] -->
>> [Tomcat server on port 7001]
>> One of the Tomcat applications sends a redirect to Apache because
>> there is a <welcome-file> directive. However, the redirect that is
>> sent says:
>> instead of
>> On the Apache side, I already have ServerName set to
>> to solve this problem for mod_rewrite. What is the corresponding
>> directive for Tomcat?
> How do you connect Apache to Tomcat?
> If you are using mod_jk, the module gets the port it sends to Tomcat via
> ap_get_server_port(), which in turn depends on UseCanonicalName. If this
> is set to On, the port is also determined from the port in ServerName.

I'm using mod_jk 1.2.6 and Apache 2.0.59. UseCanonicalName is already on in the Apache server,
and the ServerName is set to in the VirtualHost. I also tried to set ServerName
globally and that didn't make a difference.

This allows mod_rewrite to send the correct port # in rewrites, but Tomcat doesn't seem to
pick this up for some reason.

By the way, don't laugh, but this is a legacy Tomcat 3.3.1a application so I need something
for that version of Tomcat.

- Julian

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message