• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Custom error html in haproxy - not allowing entries

Scheduled Pinned Locked Moved pfSense Packages
2 Posts 1 Posters 1.2k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C
    chrisjx
    last edited by Aug 22, 2022, 10:10 PM

    I recently posted a topic:
    HAProxy broke after update to pfs 22.05

    I 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.22

    Thoughts?

    Thanks in advance.

    C 1 Reply Last reply Aug 23, 2022, 2:59 AM Reply Quote 0
    • C
      chrisjx @chrisjx
      last edited by Aug 23, 2022, 2:59 AM

      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...

      1 Reply Last reply Reply Quote 0
      1 out of 2
      • First post
        1/2
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
        This community forum collects and processes your personal information.
        consent.not_received