HAProxy community

Unable to use custom message for 404 error

Hi,

I am able to set custom error files for all errors except 404 error using errorfile and errorloc to redirect error page.

Can someone help me to set custom error page for 404 errrors.
Best Regards,
Tejesh

Unfortunately, at the moment, setting custom 404 errors is not possible.

I’ve written, earlier this year, an email about exactly this use-case to the HAProxy mailing list:
https://www.mail-archive.com/haproxy@formilux.org/msg32761.html
(To my knowledge, no conclusion was reached, nor any action was taken.)

Hi Ciprian,

Thanks for responding regarding this issue.

I think we have to raise a feature request for the same in GitHub.

Let me know your thoughts.

Best Regards,
Tejesh

Just adding support for 404 and nothing else would be quite trivial, just a matter of grep and copy-paste.

My initial proposal was to add support for arbitrary error codes.

Thus when opening the feature request we’ll have to think about how “extensive” the feature request would be.

Thus, do you think you need support for other non-standard status codes, or just 404?