Ivano,
On 11/7/24 05:38, Ivano Luberti wrote:
Hi Thomas,
Il 07-Nov-24 11:07, Mark Thomas ha scritto:
On 06/11/2024 21:17, Ivano Luberti wrote:
Hi, as stated in the subject, we had a correctly behaving tomcat 8.5
behind a reverse proxy implemented with Apache.
After upgrading to Tomcat 9 every request is seen by tomcat as
coming from localhost.
Apache and Tomcat are running on the same machine and reverse proxy
is implemented forwarding the request to localhost.
To say it all, before the upgrade requests arrived to tomcat via ip
v4 and after upgrade via ip v6
I have seen in the doc that there is a filter in tomcat to deal with
this, but I would like to know why it was working with tomcat 8.5 and
not with tomcat 9 and if there is a solution properly configuring
Apache without touching Tomcat
If you upgraded Tomcat and are seeing changes in behaviour then
doesn't that suggest Tomcat, rather than httpd, is where you need to
make changes?
I was thinking more of an incomplete configuration in Apache , exposed
by the upgrade (maybe I have bias with the people that had done that)
But after you suggestion I have looked into the old
(working)server.xml)and discovered these few lines that I think explains
it all
<Valve className="org.apache.catalina.valves.RemoteIpValve"
remoteIpHeader="x-forwarded-for"
proxiesHeader="x-forwarded-by"
protocolHeader="x-forwarded-proto"/>
I will test them asap but I think this is definitely the reason.
If you are using HTTP(s) as your proxy protocol (instead of, for
example, AJP), then this is 100% the issue you are experiencing.
It's important to configure the new Tomcat the same way the old Tomcat
had been configured ;)
-chris
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org