使用Elastic Load Balancer进行SSH流量 [英] Using an Elastic Load Balancer for SSH traffic

查看:152
本文介绍了使用Elastic Load Balancer进行SSH流量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Phabricator安装之前设置一个AWS Elastic Load Balancer.我希望ELB平衡HTTP,HTTPS和SSH流量.这是否可能,或者我需要使用HAProxy或类似产品运行自己的SSH负载平衡器?

I am wanting to setup an AWS Elastic Load Balancer in front of a Phabricator installation. I would like the ELB to balance HTTP, HTTPS and SSH traffic. Is this possible or do I need to run my own SSH load balancer with HAProxy or similar?

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

To clarify, I am aiming to load balance git operations which occur over SSH, as distinct from administrative SSH.

推荐答案

在我的Phabricator + AWS ELB设置中

In my case of Phabricator + AWS ELB setup

  1. 允许phab实例使用ELB端口.

  1. Allowed ELB port for phab instances.

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

Configured VirtualHost redirection from HTTP to HTTPS in apache sites-enable configuration file. First rules all HTTPS connection forwarded to "https://phab.example.com/index.php?path=$1" and the second rule is catching HTTP connection and redirects to 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)中将Phabricator基本URL更改为具有端口(443)的HTTPS

我希望这会对您有所帮助

I hope this will Help you

这篇关于使用Elastic Load Balancer进行SSH流量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆