httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Sneppe <>
Subject [users@httpd] Reverse proxying a Tomcat on another machine with Apache 2.0
Date Mon, 27 Oct 2003 10:19:28 GMT

I am having trouble reverse proxying a Tomcat running on a different
machine with Apache 2.0 (Both machines are running Debian Linux).

Currently, an Apache on the backend machine is sitting in front of 
the Tomcat server.

In the future, I would like to get rid of an Apache running on the
backend server, and connect directly from the frontend Apache 2.0
to the Tomcat server. And here is where I run into problems...

This is my httpd.conf for the relevant virtual host:

<VirtualHost *>

        UseCanonicalName Off

        RewriteEngine On
        ProxyRequests On
        ProxyPreserveHost On

        RewriteCond %{HTTP_HOST}  ^new\.site\.be$
        RewriteRule ^/(.*)$1   [P,L]

The problem is that this is returned when I connect
to the reverse proxy's port 80 and issue:

GET / HTTP/1.1

This is returned:

HTTP/1.1 302 Moved Temporarily
Date: Mon, 27 Oct 2003 11:26:05 GMT
Server: Apache Tomcat/4.0.3 (HTTP/1.1 Connector)
Content-Type: text/html; charset=ISO-8859-1
Transfer-Encoding: chunked

I have tried various approached to get rid of the 
":8180" returned by the Tomcat, or turn it into an
80, but to no avail...

- Playing with ProxyPassReverse & UseCanonicalName Off
  didn't help...

- The closest I came was when I used environment variables
  in combination with mod_header: I put the path-part
  of the URI into an environment variable, and then
  build my own "Location:" header before returning it
  to the client. However, this doesn't work with 
  redirects, since what the server returns is different from
  what the client asks for...

Any help is appreciated...


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message