Tag Archives: apache

Setting 503 response code for Apache default virtual host

I know I promised my next post would be a tutorial on Chef, but this is kinda related. When new Rails servers are spinning up, I want Apache to respond to any requests with 503, both for SEO purposes in case I get my DNS wrong, and to tell load balancers that the node isn’t ready yet. It took me a while to grok the Apache docs to understand how to do this, as it is a bit counterintuitive (see the bit headed “‘redirect|R [=code]’ (force redirect)”). Please let me know if there’s a better way that perhaps doesn’t involve turning on RewriteEngine.
Continue reading Setting 503 response code for Apache default virtual host