5

I'm using Apache HTTPD to proxy a local Tomcat server:

ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/

Everything works fine except when I have a 302 redirect. For some reason the ProxyPassReverse doesn't rewrite the localhost:8080 and the client gets redirected to localhost:8080 which causes a browser error.

How can I get ProxyPassReverse to work with 302 redirects?

DD.
  • 3,024
  • 10
  • 34
  • 50

1 Answers1

2

I needed to add:

ProxyPreserveHost On

This resolved the issue.

DD.
  • 3,024
  • 10
  • 34
  • 50
  • Hi, can you share your conf? I'm facing the same issue, and the ProxyPreserveHost has not solved it. Thanks – Sourcerer Aug 08 '21 at 17:00