2

As described in my question How to deploy a Node.js WebSocket server to Amazon Elastic Beanstalk?,

Using the Elastic Beanstalk web console, I've launched a new Web Server 1.0 environment with:

  • Predefined configuration: Node.js, 64bit Amazon Linux 2014.09 v1.0.9
  • Environment type: Load balancing, autoscaling

and have set Proxy Server to none.

I've noticed that Amazon is forwarding port 80 (the port for HTTP traffic) to 8080 (the port on which my application server is listening). Why?

Community
  • 1
  • 1
ma11hew28
  • 121,420
  • 116
  • 450
  • 651

1 Answers1

8

Why run the application server on port 8080?

Because then it does not need to be run as root user (which you need for ports under 1024).

Why forward port 80 to 8080?

So that it still looks like a "normal" HTTP server to the outside world (no need for ugly port numbers in the URL).

Thilo
  • 257,207
  • 101
  • 511
  • 656
  • Thanks! I also had (and then googled) this follow-up question: http://security.stackexchange.com/questions/47576/do-simple-linux-servers-really-need-a-non-root-user-for-security-reasons – ma11hew28 Nov 10 '14 at 05:45
  • Despite my reputation score, I didn't know this as I'm still in the processes of mastering server administration. :-) – ma11hew28 Nov 10 '14 at 06:31