Chris, all, the lack of RemoteIpValve configuration was definitely the
cause of the issue.
Thanks all for your time
Il 07-Nov-24 20:11, Christopher Schultz ha scritto:
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
--
Archimede Informatica tratta i dati personali in conformità a quanto
stabilito dal Regolamento UE n. 2016/679 (GDPR) e dal D. Lgs. 30 giugno
2003 n. 196
per come modificato dal D.Lgs. 10 agosto 2018 n. 101.
Informativa completa
<http://www.archicoop.it/fileadmin/pdf/InformativaTrattamentoDatiPersonali.pdf>
Il contenuto di questo messaggio e dei suoi eventuali allegati è
riservato. Nel caso in cui Lei non sia il destinatario, La preghiamo di
contattare telefonicamente o via e-mail il mittente ai recapiti sopra
indicati e di cancellare il messaggio e gli eventuali allegati dal Suo
sistema senza farne copia o diffonderli. Le opinioni espresse sono
quelle dell'autore e non rappresentano necessariamente quelle della Società.
This message and any attachment are confidential.If you are not the
intended recipient, please telephone or email the sender and delete this
message and any attachment from your system. If you are not the intended
recipient you must not copy this message or attachment or disclose the
contents to any other person. Any opinions presented are solely those of
the author and do not necessarily represent those of the Company.
dott. Ivano Mario Luberti
Archimede Informatica società cooperativa a r. l.
Via Gereschi 36, 56127 Pisa
tel.: +39 050/580959
web: www.archicoop.it
linkedin: www.linkedin.com/in/ivanoluberti
facebook: www.facebook.com/archimedeinformaticapisa/