- I have docker deployed on AWS Elastic Beanstalk - I have a Node.js web application and I require it to run on https.
- I get a 502 Bad Gateway from nginx/1.12.1 when I click on the link in the elastic beanstalk console.
- I am able to access the app at the instance level.
- I have tried configuring Load Balancer for TCP Passthrough (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/https-tcp-passthrough.html) just to check if the app would run but that didn't help.
- Next i tried configuring End-to-End Encryption in a Load-Balanced Elastic Beanstalk Environment (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https-endtoend.html) but still get the same error.
- I require End-to-End https for my app for sso.
- The following is the settings i am using in .ebextensions for https
sslSecurityGroupIngress:
Type: AWS::EC2::SecurityGroupIngress
Properties:
GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]}
IpProtocol: tcp
ToPort: 443
FromPort: 443
CidrIp: 0.0.0.0/0
In Nginx I have already increased proxy_connect_timeout and proxy_read_timeout
access the app at the instance level? Check the port again, if the node running on port 443 on the instance, not in container. 502 is most the server side error, - BMW