
我正在嘗試在 RTMP nginx 伺服器前面使用 HAproxy。
它確實連接,但不播放影片。
我有 2 台伺服器:一台與 nginx 使用 RTMP和另一個與HAProxy。
這是HA代理配置:
listen rtmp :1935
mode tcp
balance roundrobin
server s1 rtmp_server_ip:1935 check
我也嘗試過將其設置為端口1936。
這是Nginx RTMP配置:
rtmp
{
server
{
listen 1935;
listen 1936 proxy_protocol;
notify_method get;
on_play http://127.0.0.1/vod_handler;
application vod
{
play /path_to_videos/uploads/;
}
}
}
設定應該是這樣的:
網路 >> haproxy >> nginx RTMP