The confusion has occurred as on this page under "Reverse proxy configuration" it has been mentioned so :
By default, Elastic Beanstalk configures the proxy to forward requests coming in on port 80 to your main web application on port 5000.
And on this page it has been mentioned like so:
By default, Elastic Beanstalk configures the proxy to forward requests to your application on port 8080.
So is it port 5000 or is port 8080 the default port to which the requests are forwarded?
3
Answers
On Amazon Linux 2 it is 8080. You can check it by inspecting default nginx setting on the EB instance:
The 5000 could be from Amazon Linux 1, not sure about it.
If you’re using Amazon Linux 2 and the docker platform, the default port is 8000.
This is the default ElasticBeanstalk with docker setup:
Request hits port port 80, this hits instance which goes to Nginx Proxy, where it’s forwarded to Docker that by default exposes it’s services on port 8000.
By default ElasticBeanstalk runs a listener on port 80, you can confirm it in AWS ElasticBeanstalk environment by checking:
You can confirm Nginx forwarding port by running:
And check the Docker’s expose port by running: