【问题标题】:Using an Elastic Load Balancer for SSH traffic使用弹性负载均衡器处理 SSH 流量
【发布时间】:2016-01-26 13:45:17
【问题描述】:

我想在 Phabricator 安装前设置 AWS Elastic Load Balancer。我希望 ELB 平衡 HTTP、HTTPS 和 SSH 流量。这可能吗,还是我需要使用 HAProxy 或类似工具运行我自己的 SSH 负载均衡器?

为了澄清,我的目标是对通过 SSH 发生的 git 操作进行负载平衡,这与管理 SSH 不同。

【问题讨论】:

  • 你有什么运气吗?
  • 很遗憾没有。

标签: amazon-web-services amazon-elb phabricator


【解决方案1】:

以我的 Phabricator + AWS ELB 设置为例

  1. 允许用于 phab 实例的 ELB 端口。

  2. 在 apache 站点启用配置文件中配置了从 HTTP 到 HTTPS 的 VirtualHost 重定向。第一条规则将所有 HTTPS 连接转发到“https://phab.example.com/index.php?path=$1”,第二条规则是捕获 HTTP 连接并重定向到 HTTPS。

<VirtualHost *:80>
  :
  ...
    RewriteEngine On
    RewriteCond %{HTTP:X-Forwarded-Proto} =https
    RewriteRule ^(.*)$          /index.php?__path__=$1  [B,L,QSA]
    RewriteCond %{HTTP:X-Forwarded-Proto} =http
    RewriteRule . https://%{HTTP:Host}%{REQUEST_URI} [L,R=permanent]  
  ...
 :    
</VirtualHost>
  1. 在 phab 配置 (local.json) 中使用端口 (443) 将 Phabricator 基本 URL 更改为 HTTPS

希望对你有帮助

【讨论】:

  • 这与负载均衡 SSH 流量无关。
猜你喜欢
  • 2021-04-29
  • 2021-03-18
  • 2021-05-26
  • 2017-01-13
  • 2023-03-10
  • 2017-09-30
  • 1970-01-01
  • 2012-07-15
  • 1970-01-01
相关资源
最近更新 更多