I've got impressed with the simplicity of `AWS Elastic Beanstalk` and created multiple environments to deploy my `express.js APIs`. I've used the `Classic Load Balancer` with incoming requests using ports `80 & 443` and redirecting them `inbound` to `80` on the EC2 instances for NGINX to process.

But when tried to hit using the browser or other console applications with libraries like Axios, request-promise, the API does not respond and hits `502 error` after a minute. This was very weird since the APIs send the response almost immediately under 1 or 2 seconds of time.

> 
> *When I hit the APIs from the Postman console, the responses are fine. There should be some issue with NGINX, ELB and the client. **The express.js application is running totally fine without any errors.***
> 
> 
> 

I wanted to debug and took the logs from the AWS console to see the NGINX logs having tonnes of `499 errors` which was causing this issue. Moreover, some requests are not even going to NGINX from the load balancer.

I want a solution to fix this. Also, `proxy_ignore_client_abort` was one suggested way I found on multiple occasions. But, I am clueless on how to use this in .ebextensions way. If there's an answer for this, this will be helpful to solve the issue.