简体   繁体   中英

FFServer over https

we're currently providing video/audo feeds via ffserver over "http" ie http://127.0.0.1:8000/folder/feed1.mjpg

however, now we need to add the feeds to secure pages over "https" so we need to do something like this https://127.0.0.1:8000/folder/feed1.mjpg

I have searched the web and docs, but didn't find anything in reference to ffserver and https.
Is this possible? if so can anyone point me in the direction of achieving this?

I had the same problem - embedding the ffserver's non-encrypted WEBM stream into HTTPS web site was causing the browser's "mixed content" warning. I solved the problem by using Apache with mod_proxy. I basically followed this tutorial: https://www.digitalocean.com/community/tutorials/how-to-use-apache-http-server-as-reverse-proxy-using-mod_proxy-extension

In short, I made only these 3 steps:

  1. enable the proxy modules

    a2enmod proxy a2enmod proxy_http
  2. create a new virtual host in Apache listening on port 443 with the following directives:

     <VirtualHost *:443> ServerName livestream.example.com ProxyPreserveHost On ProxyPass / http://0.0.0.0:8090/ ProxyPassReverse / http://0.0.0.0:8090/ SSLCertificateFile /etc/letsencrypt/live/example.com/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem SSLCertificateChainFile /etc/letsencrypt/live/example.com/chain.pem Include /etc/letsencrypt/options-ssl-apache.conf </VirtualHost>
  3. set up DNS record for livestream.example.com

My ffserver is running on the same server as Apache, with HTTP port 8090, but I'm sure the proxy can be directed to any other IP address.

That way I was able to embed the WEBM video stream as https://livestream.example.com/somevideo.webm and get rid of the mixed content warning.

(tested on Ubuntu 16.04, Apache 2.4.18, ffserver 2.8.11)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM