On Sun, Jan 31, 2016 at 5:33 PM, Igor Cicimov <
[email protected]> wrote:

> Hi,
>
> I have a:
>
>     http-response redirect code 302 location https://blabla if { status
> 404 }
>
> statement in my haproxy 1.5.15 config but on reload I get:
>
>  * Reloading haproxy
> haproxy
> [ALERT] 030/061559 (22223) : parsing [/etc/haproxy/haproxy.cfg:142]:
> 'http-response' *expects* 'allow', 'deny', '*redirect*', 'add-header',
> 'del-header', 'set-header', 'replace-header', 'replace-value', 'set-nice',
> 'set-tos', 'set-mark', 'set-log-level', 'del-acl', 'add-acl', 'del-map',
> 'set-map', *but got 'redirect'*.
>
> which doesn't make much sense, since it states that redirect is one of the
> expected options but also not accepted.
>
> And indeed, I can not find this option in the manual and wonder why? Looks
> like it was maybe supported at one point and maybe removed since it is
> mentioned in the error message.
>
> Obviously my intention is to serve custom 404 page when received 404 from
> the backend.
>

Sorry sent the message prematurely, just some clarification. I have
currently:

    rspideny . if { status 404 }
    errorfile 502 /etc/haproxy/errors/404.http

but was looking for another possible way of doing the same and keep the 502
message too.

Thanks,
Igor

Reply via email to