tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Gray <>
Subject Re: Strange URL rewrite when reverse proxy with Apache HTTP Server
Date Tue, 21 Feb 2017 22:28:17 GMT
Antonio:  The Tomcat server has no knowledge of the F5, or that it is being
fronted by an Apache HTTP Server.  I do SSL termination in Apache HTTP
Server, and clear-text from HTTP to Tomcat.
My redirect port for the normal HTTP listen in Tomcat is commented out.
    <Connector port="18080" protocol="HTTP/1.1"
               connectionTimeout="20000" />
    <!-- A "Connector" using the shared thread pool-->
    <Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1"
               redirectPort="8443" />

The URL I am using is
It is listening on port 80 and 443, if you hit 80, internally it redirects
you to 443.  No SSL cert on the F5 load balancer.  It simply sends the
traffic to one of the two HTTP servers (round-robin, also tried
persistence, no difference).  The HTTP server is listening only for HTTPS
on 23270/tcp.

I see my "Hello world!" which is all that is in index.html.  This is the
DocumentRoot of HTTP, and *not* proxied over at this time.  Only
/SelfService and /static are proxied
/static just being my test of static content, but still served up by Tomcat.

It's exactly 30 seconds before the page cannot be loaded when trying
anything proxied to Tomcat, but also accessed via the F5 load balancer.
Not sure where the 30 seconds comes from; perhaps a load balancer time out,
as I dont see a "30" in my httpd configurations or my tomcat server.xml

There should be nothing between them to hinder it.  We have many load
balancers and this one specifically you dont need to open any firewall
requests for the specific networks the HTTP servers are on.  I did have to
get the firewall opened up to allow me to hit because the VIP for ""
is in the DMZ, and my Desktop & VPN networks cannot hit it on 80/443
without opening holes.  But beyond that, any connection from the F5 to the
HTTP Server should be 100% open bi-directional, since same subnet.

On Tue, Feb 21, 2017 at 2:05 PM, Antonio S. Cofino <>

> Aaron, on tomcat instances change the redirectPort attributte on the http
> conectó to the loabbalancer's port 443
> My guess is that your webapp has restriction rule requesting SSL con
> fidntial channel. Therefore the non-confidential to the 18080 port from the
> balancer are redirected to the 23270 port, but it should be 443.
> Antonio
> El 21/2/2017 19:46, "Aaron Gray" <> escribió:
> I have an application server from a vendor that comes bundled with an
> additional Apache Tomcat server.  The webapp SelfService.war is vendor
> supplied too.
> Here's my problem (IP's replaced to protect the innocent):
> networks:
> DMZ=172.x.x.x
> INTERNAL=10.x.x.x
> server1 https listen =
> server2 https listen =
> F5 load balancer hostname =
> backend tomcat server =
> mod_proxy configuration:
> ProxyPass /SelfService
> ProxyPassReverse /SelfService
> When I access these DMZ webservers which mod_proxy back to Apache Tomcat
> as:
> and
> <>
> They load properly. Perfectly, every time!
> When I access these DMZ webservers via the F5 load balancer (to which I
> dont have access to, but the network folks configure for me), it hangs.
> Eventually returns:
> cant load.
> No idea why the URL is being re-written with the ":23270".
> I added static content to the server.xml on (Tomcat) to test:
> <Context docBase="/path/to/tomcat/static" path="/static" />
> Then put a simple index.html in there.  Accessing via the Apache Web
> Servers works fine, but if you hit it with the Load Balancer it once again
> adds the
> Do you have any thoughts?  Thanks so much, I have been working with this
> for weeks now with no success

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message