How to assure security for a video streaming using Lighttpd?

孤街浪徒 提交于 2019-12-11 18:49:58

问题


I need to stream a video which is present on server say xyz.com. If I access the correct path of the video everyone is able to see that video. What I need to do is that create a MD5sum corresponding to the every particular video which has an unique video id.

So that from now onwards if the user is accessing the video as before ie :

it should not load for the below.

http:/xyz.com/video.mp4

It should load only for the following url

http:/xyz.com/video.mp4?md5=202cb962ac59075b964b07152d234b70

Any suggestions?


回答1:


I think you would be better using a scripting language such as php for this. However if you are adamant on doing it inside of lighttpd you can do this with mod_magnet using lua.

http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModMagnet




回答2:


Lighttpd also offers a module called "SECDownload", it is very easy to install. It enables you to make a url available for a limited time.

Tutorial is here: http://redmine.lighttpd.net/projects/1/wiki/Docs_ModSecDownload

This only creates a temporary link, the url is not limited to a IP. If one url is created, every user may access it (at least if you don't do anything to prevent this).



来源:https://stackoverflow.com/questions/11310917/how-to-assure-security-for-a-video-streaming-using-lighttpd

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!