Comment 2 for bug 475371

Revision history for this message
Tom Haddon (mthaddon) wrote :

This is because we're using haproxy's errorloc directive (see http://haproxy.1wt.eu/download/1.3/doc/haproxy-en.txt). The alternative is to use errorfile, but that has the following warnings, per the docs:

 - The files are loaded while parsing configuration, before doing a chroot().
   Thus, they are relative to the real filesystem. For this reason, it is
   recommended to pass an absolute path to those files.

 - The contents of those files is not HTML, but real HTTP protocol with
   possible HTML body. So the first line and headers are mandatory. Ideally,
   every line in the HTTP part should end with CR-LF for maximum compatibility.

 - The response is limited to the buffer size (BUSIZE), generally 8 or 16 kB.

 - The response should not include references to the local server, in order to
   avoid infinite loops on the browser in case of local failure.

We'll therefore need new files added to the tree following this specification that we can use for haproxy. Note that we don't want to change the current files (since we need them for apache errors), we just need to add new ones that match these criteria. Once this has been done we can setup haproxy to return them as appropriate.