502 Bad Gateway on EC2

0

Last week an application hosted on aws ec2 started responding with a 502 bad gateway error. Nothing changed about the files hosted or any of the settings of the instance that should cause this. In fact you can brute force log in to the application if you have the patience to keep reloading the address. I do not know how to begin to address this situation.

qcsi
asked 2 years ago3804 views
1 Answer
1

Two possibilities:

If you're running a load balancer then it will return a 502 error to the client if the instance(s) in your target group(s) are not available.

If you're running a single instance then a 502 error means that you've connected successfully to the instance but the web server software (Apache, IIS, etc) is not configured correctly. In this case, if it is intermittent then there is some issue on the instance itself. Check the log files and see what is happening.

profile pictureAWS
EXPERT
answered 2 years ago
profile pictureAWS
EXPERT
reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions