httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Frey <rainer.f...@inxmail.de>
Subject Re: [users@httpd] mod_proxy ProxyPassReverse incorrectly adjusting Location header in redirect?
Date Thu, 12 Apr 2012 09:21:10 GMT
On 12.04.2012, at 09:17, Igor Cicimov wrote:

>> On Thu, Apr 12, 2012 at 4:32 PM, Rainer Frey <rainer.frey@inxmail.de> wrote:
>> 
>> > Where did you get the idea that you can mix protocols in the reverse proxy commands
from?
>> >
>> > This doesn't [make sense]:
>> >   ProxyPass / https://internal.example.com/
>> >   ProxyPassReverse / http://internal.example.com/
>> 
>> That is wrong.
> No it's not wrong

Your above statement is definitely not correct. You *can* and sometimes *must* mix protocols
between ProxyPass and ProxyPassReverse. The only thing a working ProxyPassReverse directive
needs to match is the redirect URLs that a proxy backend returns. Apart from the fact that
it only applies to responses from proxied backends, it has /nothing/ to do with the value
in any ProxyPass directive. You don't even need a ProxyPass directive, it also applies to
mod_rewrite [P] triggered proxy passing.
This is a very common misunderstanding, and should not be left in the mailing list archive
without explanation.

>> It does not do what the OP expected, but it is definitely possible to do that, if
the backend sends non-HTTPS redirects even though it was accessed via HTTPS.
> I'm just pointing that it can't be done via mod_proxy as OP expects to, which was his
question exactly.

That's right, but for completely different reasons. He can't change the redirect to non-SSL
via ProxyPassReverse, because (and only because) the relevant ProxyPassReverse directive is
within an SSL virtual host.

Rainer


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message