Hi Willy,

Great. the first part is working fine now. I used HTTP/1.1 in health check
with Host header.


However when I add the SSL redirect "redirect prefix https://test1.com if
!{is_ssl} is_test1", I am getting the following error

-----------
 * Restarting haproxy haproxy
                                                                   [ALERT]
255/024018 (27840) : parsing [/etc/haproxy/haproxy.cfg:40] : 'redirect':
error detected while parsing redirect condition : no such ACL : '{is_ssl}'.
-----------

I am missing anything here.?




Please find answers to your question if that may help you in any way.

>where do you observe the missing Host ? In nginx logs ? Wouldn't this
>be for health check requests ? Your health checks use HTTP/1.1 and do
>not have any Host header, which is not valid regarding the HTTP spec,
>and it is very likely that nginx returns an error there, causing the
>backends to be marked down.

This makes a lot of sense. Yes I found that in nginx logs and haproxy logs
have shown health check failed on backend1 host.


>Could you describe what you'd like ? Many people use the "redirect" term to
>mean different things. For me, "redirect" is what it means in HTTP, a 3xx
>with a Location header. So if this is what you need, then yes, the
following
>line in your frontend should work :

Yes thats exactly what I want. And obviously if you have a better
suggestion for me, I will go for it. All I want is test1.com should always
use https no matter what incoming connection is.


Thanks
Basil

Reply via email to