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?

1 Answer 1

2

I needed to add:

ProxyPreserveHost On 

This resolved the issue.

1
  • Hi, can you share your conf? I'm facing the same issue, and the ProxyPreserveHost has not solved it. Thanks Commented Aug 8, 2021 at 17:00

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.