Nginx四层转发vsftp

。_饼干妹妹 提交于 2019-11-28 04:49:59
1.需要安装stream模块2.在nginx.conf默认配置文件添加如下配置即可stream {
     log_format tcp '$remote_addr [$time_local] '
                 '$protocol $status $bytes_sent $bytes_received '
                 '$session_time "$upstream_addr" '
                 '"$upstream_bytes_sent" "$upstream_bytes_received" "$upstream_connect_time"';
     upstream i2_rf {
        hash $remote_addr consistent;
        server 10.0.2.137:6666 max_fails=3 fail_timeout=30s;
        server 10.0.2.138:6666 max_fails=3 fail_timeout=30s;
     }
     server {
             listen 6666 so_keepalive=on;
             access_log logs/i2_rf-access.log tcp;
             error_log  logs/i2_rf-error.log  error;
             proxy_pass i2_rf;
             }
}

 

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