Nginx Load Balancing SFTP

Source: Internet
Author: User
Tags install openssl nginx load balancing

1, CentOS installation SFTP, reference

2, Nginx-1.8.1 download, nginx_tcp plugin download

3. Installing Nginx

[[email protected] nginx-1.8.1] # yum-y Install pcre* [[email protected] nginx-1.8.1] # yum-y Install openssl* [[email protected] nginx-1.8.1] # Patch-p1 </root/nginx_tcp_proxy_module-master/tcp.patch [[email protected] nginx-1.8.1] # ./configure--add-module=/root/nginx_tcp_proxy_module-master [[email protected] nginx-1.8.1]  make [[E-mail protected]nginx-1.8.1] makeinstall

4. Configure Nginx

user  nginx nginx;worker_processes  4; events {worker_connections  512000;} TCP {    upstream sftp{        192.168.208.141:22;         192.168.208.142:22;        Check interval=3000 rise=2 fall=5 timeout=1000;    }    server {        8080;        Proxy_pass sftp;    }}

5. Add Nginx User

[[email protected] nginx-1.8.1] # useradd Nginx

6. Start Nginx

[[email protected] nginx-1.8.1] # /usr/local/nginx/sbin/nginx

7. Turn off the firewall

[[email protected] nginx-1.8.1] # Service iptables Stop

8. WINSCP Connection

Resources:

http://blog.chinaunix.net/xmlrpc.php?r=blog/article&uid=29791971&id=4702007

Http://www.voidcn.com/blog/anonxiaozi/article/p-5529154.html

Https://github.com/yaoweibin/nginx_tcp_proxy_module

Nginx Load Balancing SFTP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.