Hello, im testing HAProxy to see what i can build with it. After shuting down all my nodes i noticed the ugly 503 page which tells me that there is no servers available. Is it possible to change this page? I cant find where its located
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I tried setting this up here is my configuration.
frontend incoming-https default_backend bad_backend
backend bad_backend mode http errorfile 403 /etc/haproxy/errors/403.http
It redirects to 503 server not found.
Not working as expected, please help…
In your HAProxy configuration, you can set a custom errorfile Checkout the HAProxy docs:
The files are returned verbatim on the TCP socket. This allows any trick such as redirections to another URL or site, as well as tricks to clean cookies, force enable or disable caching, etc… The package provides default error files returning the same contents as default errors.
The format is:
errorfile 503 /etc/haproxy/errorfiles/503sorry.http
And you’d want the file to be something like:
HTTP/1.0 503 Service Unavailable
Cache-Control: no-cache
Connection: close
Content-Type: text/html
<html>
<head>
<title>403 - Service Unavailable</title>
</head>
<body>
<div>
<h2 >Sorry. We're not here right now.</h2>
</div>
</body>
</html>
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.