See http://sigterm.sh/2012/10/nginx-apache-2-and-subversion---502-bad-gateway-error/