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.
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.
Incidentally, what do you think about dynamic favicons [1]? They're a fairly simple feature to implement, but a useful one. In your case, they'd let otherwise-useless favicons be status indicators themselves (which makes sense for anyone opening/refreshing a tab anyway) if they so chose.
Plus, it'd let your users promote their branding (upvote/downvote icons in that specific case) which is a win-win.
At minimum, some custom title text ('[user's main offering] is up'/'down' etc) would make a lot of sense, but I really think the favicons are simple enough (both to implement and to understand) and visible enough to be worth it too - it'd allow for at-a-glance uptime information [2].