Custom error html in haproxy - not allowing entries
-
I recently posted a topic:
HAProxy broke after update to pfs 22.05I deleted the error entry for custom 503 html which I had previously entered and my haproxy could once again restart. Now I'd like to replace it, but the text edit box on the form does not appear. There seems to be an unpopulated dropdown and no space to provide the custom html.
Perhaps this is related to the previous problem I posted about a few days ago,
Offhand, I think it's a bug in the page form for adding custom error messages.
From the packages page:
HAproxy 0.61_7 depends upon HAProxy 22-2.2.22Thoughts?
Thanks in advance.
-
OK. Never mind... user confusion.
I decided I wanted to add some html content. I thought the process would to go to the backend definition and expand the error files section and add my html to a record called 503.
But what we actually have to do is go, first, to the Files tab in the HAProxy screen, add the HTML in a record... then go back and add a reference to the file in the error files section.
I put in some simple html and it rejected that. Apparently it needed some pre-html references. I could not find a good reference about what was needed but I found an example, modified it and this worked:
HTTP/1.0 503 Service Unavailable Cache-Control: no-cache Connection: close Content-Type: text/html <html> <head> <title>Site Down for Maintenance</title> </head> <body style="font-family:Arial,Helvetica,sans-serif;"> <div style="margin: 10 auto; width: 960px;"> <h2>Site Maintenance</h2> </div> <p>The site is down for maintenance. If the condition persists for more than a few hours, please notify the site administrator.</p> <p>Error 503</p> </body> </html>
As you were...