浏览 5.7k
Nginx(版本1.19.3)配置tcp协议做负载均衡,运行正常,但是加上ip_hash后报错。
------------------------------------------------
“ip_hash” directive is not allow...
stream {
upstream dataexch {
ip_hash;
server 192.168.40.191:30011;
server 192.168.40.191:30012;
}
server {
listen 2001;
proxy_pass dataexch;
proxy_timeout 1s;
proxy_responses 1;
}
}第一次在项目中配置Nginx,求教是什么原因。
可以试试我的开源项目,在 nginx-rtmp-module 的基础上开发的,除了兼容 nginx-rtmp-module 的所有功能,并添加了 http-flv,gop 缓存,json 格式的 stat 数据等功能,还修复了 nginx-rtmp-module 本身的很多缺陷。
GitHub:https://github.com/winshining/nginx-http-flv-module
本网站:https://www.nginx.org.cn/plug/detail/227
微信公众号
加入微信群