gpt4 book ai didi

security - 为什么要将端口 80 转发到 8080?

转载 作者:行者123 更新时间:2023-12-02 06:58:18 25 4
gpt4 key购买 nike

如我的问题所述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.

我注意到 Amazon 正在将端口 80(用于 HTTP 流量的端口)转发到 8080(我的应用程序服务器正在监听的端口)。为什么?

最佳答案

为什么要在端口 8080 上运行应用程序服务器?

因为这样它就不需要以 root 用户身份运行(对于 1024 以下的端口,您需要这样做)。

为什么要将端口 80 转发到 8080?

这样它在外界看来仍然像一个“普通”的 HTTP 服务器(不需要在 URL 中使用丑陋的端口号)。

关于security - 为什么要将端口 80 转发到 8080?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26837355/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com