Hacker News new | ask | show | jobs
by amelius 4051 days ago
I'm looking for a technique to redirect traffic from port 80 to a maintenance page (on a different port) as soon and as long as port 80 is not bound, on Linux.
1 comments

Why the hard requirement to monitor port binding? Isn't HAProxy sufficient to do what you need? It can do maintenance page redirection if none of its backends are available.
Thanks! This could be a solution. But to be honest, I was actually hoping that the automatic redirection could be done with something as simple as an entry in iptables.