Last modified: 2011-04-15 19:20:57 UTC
When the payments server goes down for maintenance, testing, etc. we used to use Apache rewrite rules to redirect a user to a 'Downtime' page. Now that Squid is handling web requests, we need to configure Squid to be able to emulate this behavior.
Hacktually, forget the squid. We'll use iptables to redirect people to lighttpd running a non-standard port serving only DownTime.html. Proof of concept in place, need to script it so we can easily go up/down.
Wrote init.d script to bring up/down downtime with optional white-listable ipaddress to still get web access to the box. Works nicely.