nginx.conf添加内容
-
stream和http同级,在http块下添加下面内容
include /etc/nginx/conf.d/*.stream;
创建ssh.stream文件
stream {
upstream sshproxy {
hash $remote_addr consistent;
server 172.16.0.1:22;
}
server {
listen 2333;
proxy_pass sshproxy;
}
}- 使用
web服务器的2333端口连接172.16.0.1的22端口









