So it turns out that my health check was set up to hit example.com
rather than the ip address: my bad.
For the record, I discovered this by adding the $host
variable to my log formats (see end of line):
log_format debug_format '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" "$http_x_forwarded_for" host:"$host"';
access_log /var/log/nginx/access.log debug_format;
Cheers anyway