I have an Icecast server sitting behind the Apache proxy server, so the connection from the client to Icecast is done by that way:
Client -> Apache server (reverse proxy) -> Icecast server.
The reason I need the proxy, is that I need to have the urls to Icecast via HTTPS on the website, and did not find any other solution except proxying HTTPS to the port, which Icecast sitting on, via HTTP (the proposed solution is here - Why Icecast2 does not want to give the stream through https? , although there they have nginx server as proxy).
Icecast server is showing the stats - the remote ip of the clients connecting to it - and I need that stats. The stats can be viewed via the web-interface of Icecast - base url, following (/admin/listclients.xsl?mount=/mount-point-name). But after proxying the connection, Icecast shows the wrong remote ip there (it always shows the proxy server ip).
Is it possible to make Icecast show the right client ip in those stats (like put there X-Forwarded-For IP instead of REMOTE_ADDR, as the client ip is supposed to be transferred in X-Forwarded-For header to Icecast server by the Apache mod_proxy)?
Here is the config of my Apache proxy virtual host:
<VirtualHost *:443>
ServerName my-proxy-server.name
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / http://icecast-server-name:8000/
ProxyPassReverse / http://icecast-server-name:8000/
# Some other strings related to SSL-certificate
.....
</VirtualHost>
Apache version: 2.4.7 (on Ubuntu)
Icecast version: 2.4.2