On 13/01/2015 12:36 μμ, Jarno Huuskonen wrote: > Hi, > > On Tue, Jan 13, Pavlos Parissis wrote: >> Hoi, >> >> I am trying to return a specific 200 response when URL matches a ACL but I >> get >> back 503. Where is my mistake? >> >> frontend mpla >> acl robots.txt path_beg /robots.txt >> >> use_backend bk_robots if robots.txt >> >> default_backend foo_com >> >> backend bk_robots >> mode http >> errorfile 200 /etc/haproxy/pages/robots.http > > Does it work if you replace errorfile 200... with: > errorfile 503 /etc/haproxy/pages/robots.http ? >
Yeap that was the trick, thanks a lot, going to re-read the doc in order to understand why. > http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#4-errorfile > ("Code 200 is emitted in response to requests matching a "monitor-uri" > rule."). So this might work (untested): > > frontend mpla > errorfile 200 /etc/haproxy/pages/robots.http > monitor-uri /robots.txt No, it didn't. Thanks a lot Jarno, Pavlos
signature.asc
Description: OpenPGP digital signature