stream {
server {
listen 8840;
server_name t.dev.wanfeng-inc.com;
proxy_pass 172.28.133.75:8840;
ssl_preread on;
proxy_protocol on;
}
server {
listen 8840;
server_name t.test.wanfeng-inc.com;
proxy_pass 172.28.133.14:8840;
ssl_preread on;
proxy_protocol on;
}
}
这样配置,分别 telnet t.dev.wanfeng-inc.com 8840
telnet t.test.wanfeng-inc.com 8840
,始终都是 t.dev.wanfeng-in.com
有效。
另外 default server stream 里面怎么配?