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