入门客AI创业平台(我带你入门,你带我飞行)
博文笔记

NGINX通过Stream转发ftp请求

创建时间:2017-09-11 投稿人: 浏览次数:2506

一、NGINX 1.9之前,需要安装第三方的TCP插件:

http://www.cnblogs.com/i-blog/p/6165378.html

二、1.9之后直接使用Stream配置就可以了,当然需要先安装stream模块:

1.nginx 增加tcp
./configure --with-stream --with-pcre=../pcre-8.38
./configure --with-stream --without-http_rewrite_module
2.配置nginx.conf


stream { 
upstream sftp { 
hash $remote_addr consistent; 
server 127.0.0.1:22 max_fails=3 fail_timeout=30s; 

server { 
listen 90; 
proxy_connect_timeout 1s; 
proxy_timeout 3s; 
proxy_pass sftp; 

}

实际项目部署结构如下:



参考:http://www.webpiaoliang.com/xuexi/fwq/zj/20170423263321.html

声明:该文观点仅代表作者本人,入门客AI创业平台信息发布平台仅提供信息存储空间服务,如有疑问请联系rumenke@qq.com。
  • 上一篇:没有了
  • 下一篇:没有了
未上传头像