Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the port number of the web application to which default proxy config on AWS elastic beanstalk forward requests to?

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?

like image 526
user1261913 Avatar asked Sep 05 '25 03:09

user1261913


2 Answers

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.

like image 116
Marcin Avatar answered Sep 09 '25 00:09

Marcin


If you're using Amazon Linux 2 and the docker platform, the default port is 8000.

cat /etc/nginx/conf.d/elasticbeanstalk-nginx-docker-upstream.conf 
upstream docker {
    server 172.17.0.2:8000;
    keepalive 256;
like image 43
martinkaburu Avatar answered Sep 08 '25 23:09

martinkaburu