On Mon, Jun 28, 2010 at 06:39:37AM +0300, [email protected] wrote:
>
> Thank you Willy, that will do it if you say however I had the impression that
> HAproxy by default won't use backend that is currently down. For that a new
> session (redirect) always gets backend that is online unless all are down in
> which case error page is something very much acceptable.
>
> If I place custom error page on another server and it goes down user won't
> see it anyway. Also, why show error page if there are other available
> backends to serve request. Sticky sessions won't work of course but this is
> acceptable at least for me. That's what I try to achieve.
If you still have other servers available at other URLs to serve the error
page, then you'd better do that then :
frontend pub
redirect location http://sorry-page-location if { nbsrv(bk_www) lt 1 }
default_backend bk_www
Just ensure that you don't do the same with those other servers :-)
Regards,
Willy