Haproxy + Page Maintenance + backup

Hello,
I have mounted a haproxy (version 2.4.3-1) and the haproxyctl command.
I want that when the backend server 1 puts it in maintenance mode (using the haproxyctl command) it redirects you to the second server which is the backup (a php page).
When I put it in maintenance mode the backup server keeps marking it as DOWN.

is there any way to redirect to that server 2 backup in case server 1 leaves it in maintenance mode?

Hello,

If i understand your setup, you have one backend set up with one active server and one as backup.

AFAIK, the backup should be in UP state to be able to act as a backup. If it stay down, maybe you have a problem with it.

Do you perform health check ? are you sure there are successful ?

Thank you very much for the reply!

What I need is that when server 1 has the DOWN / MAINT status that it redirects to a page that I have created in php with images.

You should be able to do that with the backup server. The only limitation i remember is before haproxy use the backup server, all other have to be down or maintenance.

If you configure one server as backup, you should be able to see it status though the logs. If it stay down, you will find some hints about it in the logs too.