Using an Elastic Load Balancer for SSH traffic

自古美人都是妖i 提交于 2019-12-25 12:56:11

问题


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?

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


回答1:


In my case of Phabricator + AWS ELB setup

  1. Allowed ELB port for phab instances.

  2. 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. Change Phabricator base url to HTTPS with port(443) in phab configuration (local.json)

I hope this will Help you



来源:https://stackoverflow.com/questions/33363041/using-an-elastic-load-balancer-for-ssh-traffic

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!