Bad Gateway 502 following AWS maintenance on EC2 instance

0

Hi,

Could someone explain in layman's terms, I'm not technical, why my App running perfectly until AWS did some maintenance work on my instance is now returning a 502 Bad Gateway Error?

And can anyone help fix it?

Thanks,

Gary

asked a year ago336 views
2 Answers
2
Accepted Answer

Hello Gary,

The causes can be multiple and it really depends on what type of services or applications you're running in your EC2 instance. If I take here some assumptions: you're running a web based application that runs in a web server like apache or nginx or other, which means that for some reason those services cannot reach the application (e.g. PHP application).

Please consider provide more details on which type of workload/services or applications you're running in your EC2.

Thanks, Luis

AWS
luis
answered a year ago
0

Thanks Luis,

We've solved the issue now.

My app service was down. Also apache was causing an issue.

We ran these commands:

sudo service apache2 stop

sudo systemctl restart nginx

rails s -d

It was frustrating as the error occurred following AWS maintenance work and they weren't keen to help solve the issue.

But, again, thanks for trying to help.

Gary

answered a year ago
  • Great and sorry to hear that - it looks like that apache2 overlaps with nginx and the most likely raison is that they use the same service ports (80 HTTP, 443 HTTPS). I would recommend to, if apache is not used at all, to remove it from your instance.

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