Am 13.09.17 um 10:41 schrieb Jarno Huuskonen:
> Hi,
> 
> Can you try with newer haproxy, AFAIK 1.7.6 had redirect related
> regression:
> https://www.mail-archive.com/[email protected]/msg26519.html
>
that looks good. upgraded to version 1.7.9 and the 503 errors are gone. i can 
use the redirect scheme in my frontend section

thanxs

> On Tue, Sep 12, Markus Rietzler wrote:
>> Am 12.09.17 um 22:11 schrieb Markus Rietzler:
>>> i have some acls in my haproxy.cfg.
>>> i want to do a http https redirection for some of my urls
>>>
>>>
>>>   acl pathContent     path_beg /foo /bar
>>>   acl is_root path -i /
>>>   redirect scheme https code 301 if redirect_neander pathContent
>>>   redirect scheme https code 301 if redirect_neander is_root
>>>
>>> i sometimes see a "503 Service unavailable" error in my browser.
>>>
>>> this is a curl call to my server:
>>>
>>> curl -v http://www.server.de/foo
>>> *   Trying 12.34.45.67...
>>> * TCP_NODELAY set
>>> * Connected to www.server.de (12.34.45.67) port 80 (#0)
>>>> GET /agb HTTP/1.1
>>>> Host: www.server.de
>>>> User-Agent: curl/7.54.0
>>>> Accept: */*
>>>>
>>> < HTTP/1.1 301 Moved Permanently
>>> < Content-length: 0
>>> < Location: https://www.server.de/foo
>>> <
>>> * Connection #0 to host www.neanderticket.de left intact
>>>
>>> and in my haproxy.log i see
>>>
>>>  77.88.99.11:34548 [12/Sep/2017:22:09:28.741] www www/<NOSRV> 0/-1/-1/-1/0 
>>> 503 309 - - LR-- 34/22/0/0/0 0/0
>>> {www.server.de|curl/7.54.0} "GET /foo HTTP/1.1"\
>>>
>>> when accessed via iphone the page is redirected to ssl. then it is ok, all 
>>> objects are loaded via ssl and the page is
>>> displayed ok. BUT i do get the 503 NOSRV error in the haproxy.log.
>>>
>>> i have several 503 erros in the logs. i am a little concerned that this is 
>>> a real error and my users do see a 503 error
>>> page in the browser - at least sometimes.
>>>
>>>
>>> markus
>>>
>>>
>> if i use the acl in my frontend section i get the 503 if i use it in my 
>> backend section there is no error...
>>
>> with the redirect scheme rules in the backend section it seems to work 
>> pretty good. now i get the log
>>
>>  77.88.99.11:48362 [12/Sep/2017:22:30:34.115] www lbwww/master 4/0/0/-1/4 
>> 301 97 - - LR-- 47/27/0/1/0 0/0
>> {www.server.de|curl/7.54.0} "HEAD /foo HTTP/1.1"\
>>
>> even the tests with curl or my iphone do what they should. i see the 301 in 
>> my haproxy.log, my iphone displays the page
>> the way it should (switched from http to https)
>>
>> ./sbin/haproxy -vv
>> HA-Proxy version 1.7.6 2017/06/16
>> Copyright 2000-2017 Willy Tarreau <[email protected]>
> 


Reply via email to