【问题标题】:I want to link different ports of the same IP address to my instance so that when I type it in my address bar it shows my webpage, how to do that?我想将同一 IP 地址的不同端口链接到我的实例,以便当我在地址栏中键入它时,它会显示我的网页,该怎么做?
【发布时间】:2019-02-17 14:57:43
【问题描述】:

我想使用 nginx 进行负载平衡,使用相同 ip 地址的不同端口。但是,我不明白如何将不同的端口链接到同一个实例。我在 AWS 上使用 ec2 实例。我想通过不同的端口例如8000、8001访问实例

我最大的问题是如何在特定端口上启动进程? enter image description here

我想复制在 8000 t0 8001、8002、8003 上运行的进程,以便 IN 可以进行负载平衡。 已在 AWS 上启用入站规则

【问题讨论】:

    标签: amazon-web-services nginx amazon-ec2 load-balancing


    【解决方案1】:

    在您的 server 块中放置两个 listen PORT; 指令。 看看这个答案:https://stackoverflow.com/a/38054382/3375252

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-01-03
      • 1970-01-01
      • 1970-01-01
      • 2014-01-26
      • 2018-09-23
      • 1970-01-01
      • 2011-12-12
      • 1970-01-01
      相关资源
      最近更新 更多