如何在HAProxy上为单个url显示空的错误页面?

我有一个单一的url说:

http://foo-backend.com/display_blank_when_errored

在HAProxy负载平衡器后面的站点上,假设前端站点是:

http://foo.com

当99%的错误发生时,我想显示configuration错误文件的错误页面,但只在这个单一的页面上,我希望它返回一个空白的响应。 我怎么去做这个?

背景

这是使用HAProxy 1.5。

我有一个在IFrame中使用的互联网页面,在极less数情况下服务器closures,而不是显示错误页面,我希望它不显示任何内容,以便用户体验不受影响。

您可以为指定的url使用不同的后端部分。 例如:

 frontend webserver use_backend srv_noerrors if { url_beg /display_blank_when_errored } default_backend srv_werrors backend srv_noerrors errorfile 503 /etc/haproxy/errors/503err_blank.http backend srv_werrors errorfile 503 /etc/haproxy/errors/503err_info.http