I understand that your nginx is not working when your instance is behind the ELB. Please correct me if I misunderstood.
Your load balancer serves as a single point of contact for instance, once it is set behind it hence your nginx is not working. The issue might be the configuration of the load balancer as it needs to route traffic to your instance. To configure your load balancer, you must create target groups and then register targets with your target group for your load balancer to be effective, also create listeners to check for connection requests from clients and route requests from clients to the targets in your target group. Please refer to the outlined AWS documentation on how to configure your Load balancer.
I hope you find this information useful.
Bucket redirection rules not working with foldersasked 8 months ago
ELB creation: could not find any suitable subnets for creating the ELBasked 4 years ago
Workmail redirect rule not working for Gmail addressasked 10 months ago
ASP.NET Authentication not working for newer ELB environments.asked 3 years ago
Creating AWS workmail its not workingasked 2 years ago
Instances can't reach classic ELB in VPC after ENI changeasked 7 months ago
Double lash redirection not working after ELBasked 5 months ago
HTTP/HTTPS not working after using ELBAccepted Answerasked 10 months ago
Problem with ELB logsAccepted Answerasked 8 months ago
CNAME record redirectionAccepted Answerasked a year ago