Thank you so much Maciej, I will give it a try - although in that referenced email it seems like a scary thing to do... A hard thing to evaluate is the cost of having such rspirep processing in every response coming from that specific frontend... Is it too overwhelming to the performance?

Wouldn't this just be a perfect candidate for having it's own directive, in the likes of errorfile and errorloc, but specifically only for errors returned by servers instead of only HAProxy? ;-) Something like:

errorserverfile 404 /etc/haproxy/errorfiles/404generic.http
errorserverloc 404 http://127.0.0.1:8080/404generic.html

Thanks.

Pedro.

On Jul 19, 2009, at 7:51 PM, Maciej Bogucki wrote:

Pedro Mata-Mouros Fonseca pisze:
Greetings,

I need HAProxy to show a costumized 404 page in case an internal host responds with it's vanilla 404. I cannot change the 404 page in the internal host and it's got to be HAProxy to do it. Using rsprep can I find and replace the 404 Not Found with a 302 and a Location: new_error_page.html header?

Is this the best/only way to do it?
Thanks so much.


Hello,

You could try something like this [1].

[1] - http://www.formilux.org/archives/haproxy/0906/2144.html


Best Regards
Maciej Bogucki




Reply via email to