Re: [Pound Mailing List] http to https redirect from Apache backend

[email protected] Sat, 11 Feb 2017 18:18:52 +0100
Newsgroups gmane.comp.web.pound.general
Message-ID <[email protected]>

Enviado desde mi iPhone

> El 11 feb 2017, a las 17:02, Narcis Garcia <[email protected]> escribió:
> 
> Thanks; it didn't worked because the problem was (my fault) the lack of
> X-Forwarded-Proto header from port 443 visits (without proxy*).
> 
> Solved adding to listener:
> AddHeader "X-Forwarded-Proto: http"
> And reversing one logic of Apache directive to:
> RewriteCond %{HTTP:X-Forwarded-Proto} http
> 
> Thanks.
> 
> (*) I use sltd with SNI, no proxying.
> 
> 
> El 11/02/17 a les 12:42, Alexander Kolodziej ha escrit:
>> Try setting
>> 
>> RewiteLocation 0
>> 
>> from man page:
>> 
>>       RewriteLocation 0|1|2
>>              If 1 force Pound to change the Location: and
>> Content-location: headers in responses. If they point to the back-end
>> itself or to the listener (but with the wrong protocol) the response
>> will be
>>              changed  to  show  the  virtual host in the request.
>> Default: 1 (active).  If the value is set to 2 only the back-end address
>> is compared; this is useful for redirecting a request to an HTTPS
>>              listener on the same server as the HTTP listener.
>> 
>> 
>>> On 2017-02-10 20:33, Narcis Garcia wrote:
>>> [using Pound 2.6 with Apache backends]
>>> 
>>> Hello, I've been trying to use .htaccess in Apache sites with this:
>>> 
>>> RewriteEngine On
>>> RewriteCond %{HTTP:X-Forwarded-Proto} !https
>>> RewriteCond %{ENV:HTTPS} !on
>>> RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
>>> 
>>> But client browser says "the server is redirecting the request for this
>>> address in a way that will never complete"
>>> I've been doing many tests and it seems to be a problem between Apache's
>>> redirect and Pound frontend.
>>> This pound installation only receives traffic for port 80.
>>> If I try:
>>> RewriteRule ^ https://www.example.net%{REQUEST_URI} [L,R=301,NE]
>>> Redirects perfectly because target URL doesn't point to this Pound
>>> service.
>>> 
>>> What can I do to allow this type of redirection with Apache's rewrite?
>>> 
>>> Thanks.
>>> 
>>> -- 
>>> To unsubscribe send an email with subject unsubscribe to [email protected]
>>> Please contact [email protected] for questions.
>>> 
>> 
> 
> --
> To unsubscribe send an email with subject unsubscribe to [email protected]
> Please contact [email protected] for questions.

--
To unsubscribe send an email with subject unsubscribe to [email protected]
Please contact [email protected] for questions.