How should I configure my ELB health check when using NameVirtualHosts and redirecting to www?

view full story

http://serverfault.com – My ELB keeps taking my instances out of service, because the HTTP health check is failing. We have a DNS wildcard, and redirect everything to www: vhost.conf: ServerName www.example.com ServerAlias *.example.com RewriteEngine on RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC] RewriteRule ^ http://www.example.com/$1 [R=301,L] This works fine for actual browsers, but the HTTP health check to / fails, presumably because it's getting a 302. Is the best option to use a TCP health check, or is there a way to get HTTP to work? (HowTos)