4

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?

2

I needed to add:

ProxyPreserveHost On

This resolved the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.