咨询热线:4006-75-4006

售前:9:00-23:30    备案:9:00-18:00    技术:7*24h

Nginx端口映射TCP

2019-04-26 06:40:41 11004次

添加到


/etc/nginx/nginx.conf

添加内容:


stream {

upstream tcpLink {

hash $remote_addr consistent;

server 127.0.0.1:31905 weight=5 max_fails=3 fail_timeout=30s;

}

server {

listen 4008;

proxy_connect_timeout 1s;

proxy_timeout 3s;

proxy_pass tcpLink;

}

}

监听4008,映射到127.0.0.1:31905,名字tcpLink。


首页
最新活动
个人中心