On 05/01/2015 12:28 μμ, Thomas Heil wrote: > Hi, > On 05.01.2015 12:18, Pavlos Parissis wrote: >> On 05/01/2015 12:04 μμ, Thomas Heil wrote: >>> Hi, >>> >>> On 03.01.2015 16:31, Ram Chander wrote: >>>> Hi, >>>> >>>> I have a requirement like below: >>>> >>>> Consider there are two sets of backends. Each has some servers in it >>>> One is default , other is backup >>>> Haproxy should try second set if first set returns 404. >>> You mean all servers in the first backend return 404? If so, the option >>> "http-check disable-on-404" >>> is your best friend. >>> >>> I assume you have two backends "backend be_one" and "backend be_two". >>> >>> In the frontend section you need to declare an acl like >>> >>> -- >>> acl be_one_available nbsrv(be_one) ge 1 >>> >>> use_backend be_two if ! be_one_available >>> default_backend be_one >>> -- >>> >> I suspect that Ram wants HAProxy to 'catch' 404 responses for normal >> traffic and not for a health-check response. > so as HAProxy doest not have any glue about files, this is not possible.
Yeap, it doesn't have a glue about what data are going through. A note about catching 404 for normal traffic, it may sounds a great idea but it could easily bring a site down by any user requesting a broken or dead link. Cheers, Pavlos
signature.asc
Description: OpenPGP digital signature