简体   繁体   English

https 上的 FFServer

[英]FFServer over https

we're currently providing video/audo feeds via ffserver over "http" ie http://127.0.0.1:8000/folder/feed1.mjpg我们目前通过 ffserver 通过“http”提供视频/音频提要,即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但是,现在我们需要通过“https”将提要添加到安全页面,因此我们需要执行以下操作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.我搜索了网络和文档,但没有找到任何关于 ffserver 和 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.我遇到了同样的问题 - 将 ffserver 的非加密 WEBM 流嵌入到 HTTPS 网站会导致浏览器的“混合内容”警告。 I solved the problem by using Apache with mod_proxy.我通过使用带有 mod_proxy 的 Apache 解决了这个问题。 I basically followed this tutorial: https://www.digitalocean.com/community/tutorials/how-to-use-apache-http-server-as-reverse-proxy-using-mod_proxy-extension我基本上遵循本教程: 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:简而言之,我只做了以下 3 个步骤:

  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:使用以下指令在侦听端口 443 的 Apache 中创建一个新的虚拟主机:

     <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.comlivestream.example.com设置 DNS 记录

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.我的 ffserver 与 Apache 运行在同一台服务器上,HTTP 端口为 8090,但我确信代理可以定向到任何其他 IP 地址。

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.这样我就能够将 WEBM 视频流嵌入为https://livestream.example.com/somevideo.webm并摆脱混合内容警告。

(tested on Ubuntu 16.04, Apache 2.4.18, ffserver 2.8.11) (在 Ubuntu 16.04、Apache 2.4.18、ffserver 2.8.11 上测试)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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