HAProxy community

Customize error page by haproxy

Hello,

I have experience problem is how to setup customize the error page handle by haproxy. Which need to check the status from backend http server. If the backend http server is return 4XX or 5xx error code. Haproxy can be handle its customized error page.

Thanks All!

Haproxy does not rewrite error pages of the backend server. You can only customize haproxy own error messages.

I opened the same topic on the HAProxy mailing list:

https://www.mail-archive.com/haproxy@formilux.org/msg32761.html

And I’ve even looked through the code to see how it might be implemented, and as it stands today, I would say it is possible, but it is quite an ugly “hack”, which most likely won’t be accepted in upstream. (See the details in my initial email.)