Announcement

Collapse
No announcement yet.

Shoutcast play on HTTPS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Shoutcast play on HTTPS

    Hi All,
    I am not able to play my shoutcast streaming on HTTPS server, When I click on the play button I am getting the error as follows, What I need to do to play the URL

    HTML Code:
    Mixed Content: The page at 'https://www.XXXXXXX.com/' was loaded over HTTPS, but requested an insecure element 'https://XXX.XX.XXX.XXX:9336/;'. This request was not upgraded to HTTPS because its URL's host is an IP address.
    Please help

  • #2
    The problem is exactly as described. The server must present the media with a FQDN (Fully Qualified Domain Name), not just an IP address for the HTTPS connection to be considered secure with the certificate of the SHOUTcast server matching the FQDN selected in the SHOUTcast server's configuration.
    | Opus Audio Codec plugins 2.0 | Embedded Album Art | DiskWrite |
    | Save your playlist first! | Live voice-over | X-Fade 2.5 |
    | AterKast (Source DSP) | More of my stuff... |

    Comment


    • #3
      thinktink, Thank you for the information. Could you perhaps clarify the steps?

      Comment


      • #4
        s4sebin
        This request was not upgraded to HTTPS because its URL's host is an IP address.
        The server must have a domain name assigned to its IP address in DNS similar to shoutcast.s4sebin.com. Apparently what is set is its IP address instead which is not allowed.

        I'm not sure you can get an SSL certificate for an IP address in any case. You can read about that here.

        Another thing: Do you have your server behind a reverse proxy like Nginx or Apache? That will (or can) also affect how URLs are handled.

        Comment


        • #5
          HG2S Thanks for the response. So you are suggesting creating a subdomain and pointing to a streaming URL For eg: https://111.111.11.11:34333; -> music.abc.com is it correct?

          Comment


          • #6
            Originally Posted by s4sebin View Post
            HG2S Thanks for the response. So you are suggesting creating a subdomain and pointing to a streaming URL For eg: https://111.111.11.11:34333; -> music.abc.com is it correct?
            Yes, exactly. In order to retire the error message "This request was not upgraded to HTTPS because its URL's host is an IP address." you will need to add an A record to DNS for the IP address of your server and get an SSL certificate for the given subdomain (like music.abc.com).

            Another thing, are you using a special port (number) for your streaming server? Why is port 9336 referred to in your original post?

            Comment


            • #7
              Yes, I am using the port. When we create the radio in WHM it will provide the radio Ip and radio port i am using this for streaming , For Eg: Radio Port : 9300 and Radio IP 122.22.222.222. So I am using the streaming URL as https://122.22.222.222:9300;​

              Comment


              • #8
                Do you have a reverse proxy (Nginx or Apache) in use for your site? Does your IP address have a domain name yet?

                Comment


                • #9
                  I have Apache in my server and also has a domain name that is pointed to the radio home website.

                  Comment


                  • #10
                    By the way, what version of Shoutcast are you running? I believe that since v. 2.6.1 no reverse proxy is required if you are using SSL. Take a look at this post.

                    Comment


                    • #11
                      Current Sonic panel version is : 2.31 and shoutcast version is : 2.5.5.733. My domain has a valid SSL certificate but my server doesn't have the valid SSL. I am accessing the unsecure IP address for streaming from my website. For Eg: My website is https://www.abc.com and my streaming URL is http://127.0.0.1:9300;

                      Comment


                      • #12
                        Do you have access to the Apache configuration or does your hosting company handle that?

                        Comment


                        • #13
                          Yes I do have access to the Apache configuration

                          Comment


                          • #14
                            When I visit the shoutcast interface from radio list, I can see that a notification says "New DNA S version available Please update asap ". There is a login link there but I cannot login with Cpanel credentials / radio credentials but nothing works
                            Attached Files

                            Comment


                            • #15
                              Originally Posted by s4sebin View Post
                              Yes I do have access to the Apache configuration
                              First, I am not an Apache guru and really have no advanced experience with it as a reverse proxy. You should have this vetted by someone who knows what they are doing. That said, here are the basics.

                              This assumes you have a Shoutcast server running already with the following properties: a Shoutcast v.2 server with IP address 192.168.111.222, FQDN shoutcast.mydomain.com, and running on port 9300.

                              If needed activate the proxy feature of Apache by enabling the following modules:

                              sudo a2enmod proxy
                              sudo a2enmod proxy_http
                              sudo a2enmod proxy_balancer
                              sudo a2enmod lbmethod_byrequests​

                              Create or modify your virtual site file:

                              sudo nano /etc/apache2/sites-available/shoutcast.mydomain.com.conf​

                              Add/integrate the reverse proxy configuration to your site:

                              <VirtualHost *:80>
                              ServerName shoutcast.mydomain.com

                              ProxyRequests Off
                              ProxyPreserveHost On
                              ProxyPass / http://192.168.111.222:9300/
                              ProxyPassReverse / http://192.168.111.222:9300/
                              </VirtualHost>​

                              This will enable Apache to act as a reverse proxy for the domain shoutcast.mydomain.com and forward requests to the Shoutcast streaming server running at IP address 192.168.111.222 on port 9300.

                              Save and close the site configuration.

                              Enable the site:

                              sudo a2ensite shoutcast.mydomain.com.conf

                              Restart Apache:

                              sudo systemctl restart apache2

                              Test the reverse proxy by accessing http://shoutcast.mydomain.com in a web browser.

                              Does this make sense?

                              Comment

                              Working...
                              X