LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Darkice/Icecast weird interaction with nginx (https://www.linuxquestions.org/questions/linux-software-2/darkice-icecast-weird-interaction-with-nginx-4175659801/)

ikristiank 08-25-2019 10:30 PM

Darkice/Icecast weird interaction with nginx
 
I've just got an nginx reverse proxy set up so that users on my intranet can go to a URL to access my Icecast stream.

Before the reverse proxy, the stream URL looked like '192.168.0.1:8000/stream.mp3.m3u' and now I've got it to load that same file in 'example.com', now the issue is that there is no audio when going to 'example.com' when there is audio at '192.168.0.1:8000/stream.mp3.m3u'.

Is there some setting in Darkice or Icecast that would allow it to be accessed through a reverse proxy like this? Or is there something I might have missed in setting up the reverse proxy?

For the reverse proxy, I used nginx and changed the /etc/nginx/sites-available/default to:
Code:

add
server {
        listen 80;
        listen [::]:80;

        server_name example.com www.example.com;

        location / {
                proxy_pass http://192.168.0.1:8000/stream.mp3.m3u;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection 'upgrade';
                proxy_set_header Host $host;
                proxy_cache_bypass $http_upgrade;
        }
}

Again, the page loads what looks like a stream, but for some reason it produces no audio.

E: Additionally, I added the following line to my /etc/hosts file:
Code:

192.168.0.1 example.com


All times are GMT -5. The time now is 02:24 PM.