ssl - Rewriting 302 App Server ReDirect URLs with Apache Proxy in the Middle - Server Fault
I always wrestle with a problem for hours before giving up and posting a question - only to solve my own problem minutes after posting ...
For those interested, the solution is not to use ProxyPassReverse, but rather to use the Header directive - it' let's you mess with outbound headers. In this case, I can capture the Location response header and run a regex on it to fix the URL's protocol:
ProxyPreserveHost on RewriteEngine on RewriteRule ^/app$ /app/ [PT] ProxyPass /app ajp://localhost:8009/app Header edit Location ^http(\:\/\/proxy.*)$ https$1
Read full article from ssl - Rewriting 302 App Server ReDirect URLs with Apache Proxy in the Middle - Server Fault
No comments:
Post a Comment