Right now, my AWS health check hits my server pretty tirelessly:
... 54.228.16.40 - - [14/Jan/2014:10:17:22 +0000] "GET / HTTP/1.1" 301 178 "-" "Amazon Route 53 Health Check Service" 54.248.220.40 - - [14/Jan/2014:10:17:24 +0000] "GET / HTTP/1.1" 301 178 "-" "Amazon Route 53 Health Check Service" 54.232.40.110 - - [14/Jan/2014:10:17:25 +0000] "GET / HTTP/1.1" 301 178 "-" "Amazon Route 53 Health Check Service" 54.241.32.78 - - [14/Jan/2014:10:17:26 +0000] "GET / HTTP/1.1" 301 178 "-" "Amazon Route 53 Health Check Service" 54.245.168.46 - - [14/Jan/2014:10:17:28 +0000] "GET / HTTP/1.1" 301 178 "-" "Amazon Route 53 Health Check Service" 54.251.31.174 - - [14/Jan/2014:10:17:28 +0000] "GET / HTTP/1.1" 301 178 "-" "Amazon Route 53 Health Check Service" ...
And I would like to configure NginX so as not to register requests using the "Amazon Route 53 Health Check Service" user agent.
My current attempt is as follows:
# default server for forwarding all requests over to main www domain server { listen 80 default_server; server_name _; return 301 $scheme://www.example.com$request_uri; }
This looks good to me, and in fact, when I have CURL the same address that is set for health check:
curl --user-agent "Amazon Route 53 Health Check Service" http:
I get what I expect:
Service OK
And my request does not end in the logs.
However, my logs are still loaded with these requests when they come from the actual AWS health check.
Any ideas on where I'm doing it wrong?
thanks
source share