Hi Mikołaj,

On 2010-04-13 12:47, Mikołaj Radzewicz wrote:
> I was trying to configure custom error pages on haproxy but after
> waisting a lot of time I'm not successful. I wanted to serve it all
> the time as my backends give it to the clients.

if I understand you correct you want to check if one of your backends
returned a HTTP 500 and replace its response to the client with the
errorfile in haproxy.

This is actually not possible. The errorfile and errorloc parameters
only apply for error generated by Haproxy itself. So the file specified
in errorfile 500 ... is only served if Haproxy itself had an internal
error. You have to fix your application error pages instead.

Also as Thomas noted, the configured errorfiles are in HTTP format. Thus
at least you would have to add the appropriate HTTP headers. Be sure to
use the correct linebreaks (\n\r)

--Holger

Reply via email to