[load balancer]

I need to put a custom 503 error page in a loadbalancer. I prefer to use the “errorfile” directive https://cbonte.github.io/haproxy-dconv/1.6/configuration.html#4-errorfile instead of “errorloc” because I don’t want the user browser is redirected to a different website url containing the error page.
Since standard load balancer UI configuration does not allow to mount a volume, is there a way to put a custom file in it?

The only way I found to do that is to congigure the LB via docker-compose.yml.
I have downloaded the existing lb’s docker-compose.yml and rancher-compose.yml from Rancjer, then I added the mount of an external nfs volume and added the errorfile configuration to the haproxy.cfg.
Finally, I have deleted the service and re-added thorough rancher-compose.

1 Like