On Wed, Sep 12, 2012 at 12:39:25PM +0530, basil varghese wrote:
> 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

sorry, spaces were needed :

     redirect prefix https://test1.com if !{ is_ssl } is_test1

> 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.

OK.

> >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.

Then please look at my other reply today in another thread where I posted
a patch to support "redirect scheme" :

         redirect scheme https if !{ is_ssl }

And it will work whatever the domain name.

Regards,
Willy


Reply via email to