[Icecast] Icecast2, ezstream and reverse proxy

Hoggins! hoggins at radiom.fr
Fri May 23 09:34:12 UTC 2014


Hello,

Correct me if I'm wrong, but what you get from Icecast *is* HTTP.
Anyway, we use proxying because on our server, some of our clients
cannot connect to port 8000 without bypassing their company firewall,
and we don't have the possibility to add another public IP. So with
Apache, here is what we do :

########################################################################
#
# VirtualHost for live.radiom.fr proxying on port 80
#
########################################################################
<VirtualHost [::]:80>
        CustomLog /var/log/httpd/sites/radiom.fr/stream_access.log combined
        ErrorLog /var/log/httpd/sites/radiom.fr/stream_error.log
        ServerName live.radiom.fr
        SetEnv downgrade-1.0 1
        SetEnv force-response-1.0 1
        ProxyRequests Off
        ProxyPass / http://localhost:8800/
        ProxyPassReverse / http://localhost:8800/
        ExtFilterDefine fixplaylistport mode=output cmd="/usr/bin/sed -e
's/localhost:8800/live.radiom.fr/g' -e
's/live.radiom.fr:8800/live.radiom.fr/g'"
        <Location />
                Order allow,deny
                Allow from all
                ExtFilterOptions LogStdErr Onfail=remove
                SetOutputFilter fixplaylistport
        </Location>
</VirtualHost>

And it works like a charm, and allows us to benefit from the HTTP 1.1
"Host" header, and use it in a virtual host.
The filter simply rewrites the listening URL served by the Icecast pages
to routable addresses and routable ports.

I would agree this is not the most elegant way to do, but we don't have
a choice here.

Cheers !

Le 23/05/2014 10:59, "Thomas B. Rücker" a écrit :
> On 05/21/2014 10:51 PM, David Hendry wrote:
>> Ezstream is working well locally with Icecast2 on port 8000 on a Debian Wheezy platform. However, I use a reverse proxy (Pound) to pass all requests from the Internet for x.mysite.com to backend localhost:8000 i.e. my Icecast2 server.
> The short answer is: don't put Icecast behind a reverse proxy.
>
>>  This works fine, i.e. x.mysite.com brings up the Icecast2 Status page. My problem is with the ezstream xml configuration <url></url> setting which must have a port number, and if I put <url>x.mysite.com:8000</url> icecast2 does not get the stream. If I use NAT on my router to bypass the reverse proxy, x.mysite.com:8000 goes straight to Icecast2 and everything works; but I don't want to do it this way. Do you have any ideas as to what I can do to get  ezstream working with icecast2 and my reverse proxy?
> You are trying to put non-HTTP traffic through a HTTP reverse proxy, I'm
> not the least surprised that this fails.
> There /might/ be a slim chance to get things working better if you
> switch to Icecast 2.4.0 AND use a source client that uses PUT instead of
> SOURCE. But only if the reverse proxy supports PUT.
>
> Your reverse proxy might still have problems with the long-lived TCP
> connections and other things specific to Icecast.
>
> Cheers
>
> Thomas
> _______________________________________________
> Icecast mailing list
> Icecast at xiph.org
> http://lists.xiph.org/mailman/listinfo/icecast
>




More information about the Icecast mailing list