Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ashitvora's avatar

What ping path to specify for ELB?

I am using AWS Classic ELB and when I specify Ping Path as just "/" ELB is marking EC2 as OUT OF SERVICE.

Looks like its not able to reach it. What should be the protocol and path for Pinging the EC2 instances.

Do I need to make any changes in NGINX config on EC2 instances?

0 likes
1 reply
fideloper's avatar

Try a curl request to the IP address of the server (you may need to do with from within a server in the same private network depending on your VPC setup).

Something like: curl -i http://172.68.12.111/, without any host headers, etc. That's essentially what the ELB will send along. The -i flag will show sent and returned HTTP headers, so you can see exactly what the response is.

My guess is that you'll see Nginx is returning a non-200 response if that curl request is going to a default Nginx site and not the one that's configured via a server_name.

Here (sorta random, I know) is a tweet that might clarify what I mean - how Nginx (and all web servers) use the Host header to decide which site to serve from any given HTTP request: https://twitter.com/fideloper/status/996731264337108992

Please or to participate in this conversation.