[Icecast] admin console
jake at jakebriggs.com
jake at jakebriggs.com
Tue Jan 7 20:38:41 UTC 2020
January 7, 2020 10:56 AM, "user" <5f787a at i2pmail.org> wrote:
> 2020-01-06 17:50, Philipp Schafft wrote:
...
...
>
> I'm consider to put icecast behind reverse proxy. It is not so easy as I
> think before. Does anyone have experience with it?
I run it behind a reverse proxy on apache, and everything works bar one thing - the links in the status and admin interface that serve up an m3u file give you file with the "wrong" URL in it.
So, I have icecast on port 8000. My streams are available on http://my.url.tld:8000/jake-radio.mp3 but that 8000 gets blocked by corporate firewalls sometimes so I want to be able to get to http://my.url.tld/jakemusic instead.
My apache config looks like:
-------- 8< --------
ProxyPreserveHost On
ProxyPass /jakemusic http://localhost:8000/jake-radio.mp3
ProxyPassReverse /jakemusic http://localhost:8000/jake-radio.mp3
-------- 8< --------
You need a ProxyPass and ProxyPassReverse to and from each mount point. I don't think you need ".mp3" but I have i.
I don't bother proxying the admin interface since I can just browse to port 8000 since I control the firewall, but I don't have any reason to believe that this wouldn't work fine:
-------- 8< --------
ProxyPass /admin http://localhost:8000/admin
ProxyPassReverse /admin http://localhost:8000/admin
-------- 8< --------
Proxying to the root "Icecast2 Status" page is doable but I've never had any luck doing something like this:
-------- 8< --------
ProxyPass /status http://localhost:8000/
ProxyPassReverse /status http://localhost:8000/
-------- 8< --------
Anyway the m3u files and the "stream url" generated by the status and admin pages can't know they are behind a proxy so they still point to port 8000 :
http://my.url.tld:8000/jake-radio.mp3
even though you really want:
http://my.url.tld/jakemusic
There are other more "correct" or more elegant options than reverse proxying, I am just a bit lazy. The best option would be to have icecast listen on port 80 and all these issues don't matter any more. You can set up a virtual interface that gets a different IP and have icecast on port 80 on that interface so you can have apache AND icecast both listen to port 80 on the same physical machine which is what I should do to be honest but again - too lazy.
Jake
More information about the Icecast
mailing list