标签:str .com code 实现 HERE com guide http directive
但在1.90发布后增加了tcp代理模块 所以无需安装 参考:https://docs.nginx.com/nginx/admin-guide/load-balancer/tcp-udp-load-balancer/实现方式:
stream {
server {
listen 6379;
# ...
proxy_pass 10.59.87.121:6379;
}
}
如果报错:
报错1:tcp模块报错
] # /data1/env/nginx/sbin/nginx -t
nginx: [emerg] "stream" directive is not allowed here in /data1/env/nginx/conf/conf.d/tcp.conf:1
原因: strem模块不能放在http的模块内部 ,因为不是http协议.
标签:str .com code 实现 HERE com guide http directive
原文地址:http://blog.51cto.com/cuidehua/2164573