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?
On Amazon Linux 2 it is 8080. You can check it by inspecting default nginx setting on the EB instance:
cat /etc/nginx/conf.d/elasticbeanstalk/00_application.conf
location / {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
The 5000 could be from Amazon Linux 1, not sure about it.