[英]Why forward port 80 to 8080?
As described in my question How to deploy a Node.js WebSocket server to Amazon Elastic Beanstalk? 如我的问题如何将Node.js WebSocket服务器部署到Amazon Elastic Beanstalk中所述? ,
,
Using the Elastic Beanstalk web console, I've launched a new Web Server 1.0 environment with:
使用Elastic Beanstalk Web控制台,我推出了一个新的Web Server 1.0环境:
- Predefined configuration: Node.js, 64bit Amazon Linux 2014.09 v1.0.9
预定义配置:Node.js,64位Amazon Linux 2014.09 v1.0.9
- Environment type: Load balancing, autoscaling
环境类型:负载平衡,自动扩展
and have set Proxy Server to none.
并将Proxy Server设置为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). 我注意到亚马逊正在将端口80(HTTP流量的端口)转发到8080(我的应用服务器正在侦听的端口)。 Why?
为什么?
Why run the application server on port 8080? 为什么要在端口8080上运行应用服务器?
Because then it does not need to be run as root
user (which you need for ports under 1024). 因为它不需要以
root
用户身份运行(1024以下的端口需要)。
Why forward port 80 to 8080? 为什么将80端口转发到8080?
So that it still looks like a "normal" HTTP server to the outside world (no need for ugly port numbers in the URL). 因此它仍然看起来像外部世界的“正常”HTTP服务器(URL中不需要丑陋的端口号)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.