阿里云ECS 默认是没有安装 nginx ,先安装 nginx

yum update
yum install nginx
systemctl enable nginx
systemctl start nginx

其次,安装 stream 模块

yum install nginx-mod-stream

之后,在 **events ** 上面,添加 stream

stream{
    server{
        listen 443;
        proxy_pass forward;
        proxy_timeout 10m;
        proxy_connect_timeout 5000ms;       
    }
    upstream forward {
        server ip:443;
    }
}

最后,重启 nginx 即可

/bin/systemctl restart nginx.service