I hope you can help me. I have succesfully configured an ELB attached to two ec2 instances. ELB listens on port 443 and forwards to port 80.
Everything works as expected.
What I want to achieve now is to block all traffic to the ec2 instances except the one coming from the ELB.
I have a created a new security group:
Accept all from sg-xxxxx
Where sg-xxx is the security group of the ELB which is set to:
Accept HTTPS from 0.0.0.0/0 | 0:*
I go the ec2 instance, remove the default SG and assign the newly created SG to accept traffic only from the ELB (networking, assign security group) server responds with:
<html>
<head>
<title>502 Bad Gateway</title>
</head>
<body>
<center>
<h1>502 Bad Gateway</h1>
</center>
<hr>
<center>nginx/1.15.8</center>
</body>
</html>
What am I doing wrong?
Thank you for any help!
0.0.0.0/10
is supposed to mean? Maybe you wanted0.0.0.0/0
for your ELB? – Marcinnginx/1.15.8
responding, not ELB with the error. Thus i would look at nginx? Maybe your app stopped running? – Marcin