My website is https and radio stream player i have injected is http, most browsers are not playing the radio stream

SYSTEM INFORMATION B
OS type and version Ubuntu server Linux 5.2.0 on x86_64
Webmin version 2.111
Virtualmin version 7.10.0
Webserver version Apache web server
Related packages SUGGESTED

error:
(index):1845 Mixed Content: The page at ‘https://power99.live/’ was loaded over HTTPS, but requested an insecure element ‘http://serverid:port/stream.mp3’. This request was automatically upgraded to HTTPS, For more information see Chromium Blog: No More Mixed Messages About HTTPS

please tell a way to redirct this http request to https so that mt radio stream plays on all modren browsers

I reckon none of the current browsers will play the stream because all of them automatically block active insecure content.

You either want to deploy an SSL certificate for the domain/IP that hosts the stream and commit to HTTPS or enable a proxy.

I stand corrected if there’s a third way, but I doubt.

i am using virtuaminl please guide me what proxy should i use,

You are not using virtualmin on the remote server and the remote server does not have a certificate so therefore will be blocked, if you cannot add a certificate to the remote server serve your web site over http rather than https and see if that works

To proxy are you using apache or nginx as a web server? If you had filled the system details in at the top of the post we would know that already

just updated the system details

Create a domain call it something like radio.domain.tld then proxy that site to the radio player, you must use a domain name not an ip address, but your radio player does have a resolvable domain name so no problem there. Change the code in your website from the ip address you currently have to your proxy domain name

@jimr1 found this method on the internet please tell me if its gonna help??

Install the Apache server.
apt-get update
apt-get install apache2

Enable the required Apache modules.
a2enmod ssl
a2enmod rewrite

Edit the Apache configuration file for the desired website.
vi /etc/apache2/sites-enabled/000-default.conf

Add the following lines to this configuration file.
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L]

Here is the file, before our configuration.
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

Here is the file, after our configuration.
<VirtualHost :80>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.
) https://%{SERVER_NAME}/$1 [R=301,L]
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

Restart the Apache service.
service apache2 restart

In our example, the Apache server will redirect all HTTP requests to HTTPS.
From a remote Linux computer, try to perform an HTTP access.
curl -I http://www.gameking.tips

Here is the command output.
HTTP/1.1 301 Moved Permanently
Date: Tue, 12 Jan 2021 19:27:59 GMT
Server: Apache/2.4.41 (Ubuntu)
Location: https://www.gameking.tips/
Content-Type: text/html; charset=iso-8859-1

In our example, if a user tries to access the HTTP version of any page, he will be redirected to the HTTPS version of the same page.

Make sure that you have an HTTPS website configured on the Apache server or the connection will be lost.

As an example, here is an Apache configuration file with HTTP and HTTPS enabled.

<VirtualHost :80>
ServerName www.gameking.tips
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.
) https://%{SERVER_NAME}/$1 [R=301,L]
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

<VirtualHost *:443>
ServerName www.gameking.tips
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/apache2/certificate/apache-certificate.crt
SSLCertificateKeyFile /etc/apache2/certificate/apache.key

Congratulations! You successfully configured the HTTP to HTTPS redirection on the Apache server.

This has no bearing on the issue, you need a certificate on the server (141.136.42.250
_dc-mx.34d153165200.power99.live ) that is valid and serve content. see here


as you can see your radio player works fine in chrome using the http protocol to get it to work you need a certificate for it

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.