Jan*_*ard 5 configuration reverse-proxy load-balancing haproxy
我有haproxy为我们工作。但是现在有两个 haproxy 进程正在运行。一个用于 HTTP,另一个用于 TCP (RTMP)。我试图在一个配置文件中配置两个代理,但 haproxy 只处理 HTTP。
我的配置文件:
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
#daemon
debug
user haproxy
group haproxy
maxconn 4096
defaults
log global
mode tcp
option tcplog
option dontlognull
option redispatch
retries 3
maxconn 2000
contimeout 10000
clitimeout 50000
srvtimeout 50000
listen http :80
mode tcp
balance roundrobin
server h1 xxx.xxx.xxx.xxx:80 check
server h2 xxx.xxx.xxx.xxx:80 check
listen rtmp :1935
mode tcp
balance roundrobin
server s1 xxx.xxx.xxx.xxx:1935 check
server s2 xxx.xxx.xxx.xxx:1935 check
Run Code Online (Sandbox Code Playgroud)
这对我不起作用。它仅在我将配置一分为二(一个 HTTP,一个 RTMP)并启动两个 haproxy 进程时才有效。
| 归档时间: |
|
| 查看次数: |
1137 次 |
| 最近记录: |