小编Osc*_* H.的帖子

在 nginx 下运行的 Icecast2 无法连接

我想开始说,我已经四处寻找这个问题的答案,但似乎没有其他人遇到过这个问题,或者没有人在做这个问题。所以,我最近在我的 Debian 服务器上安装了 icecast2,问题是我完全能够从连接到端口 8000 上的本地 IP 的本地网络向我的服务器广播,并在 radio.example.com 上通过互联网收听流因为我用 nginx 代理它,所以到目前为止完全没有问题。问题在于当我想广播到我用 nginx stream.example.com 提供的域时

我有两个理论,一个是代理没有给 icecast 提供源 IP,所以它认为它是从 127.0.0.1 广播的,另一个是 nginx 对数据流做了一些奇怪的事情,因此没有提供正确的格式给冰铸。

有什么想法吗?提前致谢!

这是nginx配置

server {
    listen 80;
    listen [::]:80;
    server_name radio.example.com;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Server $host;
    proxy_set_header X-Real-IP $remote_addr;


    location / {
            proxy_pass http://127.0.0.1:8000/radio;
            subs_filter_types application/xspf+xml audio/x-mpegurl audio/x-vclt text/css text/html text/xml;
            subs_filter ':80/' '/' gi;
            subs_filter '@localhost' '@stream.example.com' gi;
            subs_filter 'localhost' $host gi;
            subs_filter 'Mount Point ' $host gi;
    }
} …
Run Code Online (Sandbox Code Playgroud)

streaming nginx broadcast stream icecast

3
推荐指数
1
解决办法
4965
查看次数

标签 统计

broadcast ×1

icecast ×1

nginx ×1

stream ×1

streaming ×1