Lighttpd 图片和视频等文件的防盗链处理

  用过Apache的朋友都知道mod_rewrite可以用来进行处理防盗链,Lighttpd也有同样的功能,而且总的来说,lighttpd.conf配置文件比httpd.conf更简单明了。 原来一直使用Apache来处理防盗链,今天修改了服务器上Lighttpd的配置,直接实现了防盗链,下面是防盗链部分的代码。

$HTTP["referer"] !~ "^($|http://.*\.(toplee\.com|8zone\.cn))" {       
  $HTTP["url"] =~ "\.(jpg|jpeg|png|gif|rar|zip|mp3)$" {
    url.redirect = (".*"    => "")


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
10 Responses
  1. Steven.Dai says:


  2. Michael says:


    你说的情况不是很明确,首先你有没有分布式? 还是只是单机? 另外你提供的服务是直接在线播放吗?







  3. Steven.Dai says:


  4. 很久没来了,又更新了.

  5. 阿超 says:

    博主你好 我一直在网上找一些防止盗连的技术或者软件 看见了你的文章
    像看见了希望一样 我的网站上视频放在一个服务器上 页面放在一个服务器上
    应该如何处理盗连呢 我的服务器都是windows的 麻烦帮我想想办法可以么
    我在 这个网站上 看见类似我想要的 他的视频文件都是wmv格式和我的一样 他的是写了什么程序处理了 应该这个程序怎么实现 没点思路 望指教

  6. monface says:


  7. monface says:

    /usr/share/doc/lighttpd-1.4.20/lighttpd.conf 具体都不晓得应该是那个了

  8. Michael says:

    monface: 我vps的,路径如下
    /usr/share/doc/lighttpd-1.4.20/lighttpd.conf 具体都不晓得应该是那个了

    应该是 /etc/lighttpd/lighttpd.conf

  9. 小飞 says:

    这个是vi /etc/lighttpd/lighttpd.conf 吗?

  10. Ugg Sale UK says:

    There are some most important information in your article. If you have any more better articles, welcome to share with us.

  11. What’s up, after reading this amazing post i am
    too cheerful to share my experience here with colleagues.

  12. minecraft says:

    This post is actually a fastidious one it helps new the web people,
    who are wishing in favor of blogging.

  13. minecraft says:

    Link exchange is nothing else except it is simply placing the other person’s webpage
    link on your page at proper place and other person will also do
    same for you.

  14. minecraft says:

    I have been exploring for a little for any high quality articles or
    blog posts on this sort of area . Exploring in Yahoo I ultimately stumbled upon this site.

    Reading this information So i’m glad to convey that I’ve a very excellent uncanny feeling I found out just what I needed.

    I most definitely will make certain to do not put out of your
    mind this web site and provides it a look on a relentless basis.

  15. minecraft says:

    It’s difficult to find knowledgeable people about this topic, but you sound like you know what you’re talking about!

  16. minecraft says:

    Thank you for another wonderful article. Where else may
    anybody get that kind of info in such a perfect method of
    writing? I have a presentation subsequent week, and I am on the look for such information.

  17. Hi, Neat post. There is a problem along with your site in internet explorer, could check
    this? IE nonetheless is the marketplace chief and a big
    element of people will leave out your fantastic writing due to this problem.

  18. I believe that is one of the so much important information for me.
    And i am happy reading your article. But want to observation on few general things, The web site taste is perfect, the
    articles is in point of fact excellent : D. Excellent job, cheers

  19. Hello there, just became alert to your blog through Google,
    and found that it’s truly informative. I am going to watch out for brussels.
    I’ll appreciate if you continue this in future. A lot of people will
    be benefited from your writing. Cheers!

  20. What’s up friends, its fantastic post on the topic of cultureand completely
    explained, keep it up all the time.

  21. Greetings! I know this is somewhat off topic but
    I was wondering which blog platform are you using for this website?

    I’m getting sick and tired of WordPress because I’ve had issues
    with hackers and I’m looking at alternatives for another platform.
    I would be fantastic if you could point me in the direction of a good

  22. Coconut Oil says:

    Hi i am kavin, its my first occasion to commenting anyplace, when i read this
    post i thought i could also create comment due to this brilliant piece
    of writing.

  23. Hello there I am so grateful I found your site, I really found
    you by mistake, while I was looking on Google for something else, Anyhow
    I am here now and would just like to say thank
    you for a remarkable post and a all round interesting
    blog (I also love the theme/design), I don’t have time to read through it all at the moment but
    I have bookmarked it and also added your RSS feeds, so when I have time I will be back to read more, Please do keep
    up the awesome jo.

  24. Coconut Oil says:

    What’s up to all, the contents existing at this web site are in fact awesome for people knowledge, well,
    keep up the good work fellows.

  25. If some one wishes to be updated with latest technologies after that he must be go to see this web site and be up to date

  26. Hello there! I just would like to give you a big thumbs up for
    your excellent info you have got right here on this post. I am
    returning to your web site for more soon.

  27. I was extremely pleased to uncover this page.

    I want to to thank you for ones time due to this wonderful read!!
    I definitely savored every little bit of it and i also have you bookmarked to look at new
    information on your site.

  28. quest bars says:

    I do not even know how I finished up here, however I
    thought this submit was good. I do not know who you’re however definitely you are going to a well-known blogger if you aren’t already.

  29. Quest Bars says:

    It’s really very complex in this busy life to listen news on Television, thus
    I just use the web for that reason, and get the most recent information.

  30. Remarkable! Its in fact awesome post, I have
    got much clear idea on the topic of from this

  31. Sling TV says:

    What you published made a ton of sense. But, consider this, what if you were to write
    a awesome headline? I ain’t suggesting your content isn’t solid., but suppose you added a headline that grabbed people’s attention? I mean Lighttpd 图片和视频等文件的防盗链处理 | 李俊麟的平凡生活 is a
    little plain. You could peek at Yahoo’s home page and note how
    they create news headlines to get people to click. You might add a related
    video or a related pic or two to grab readers excited about
    everything’ve got to say. Just my opinion, it could
    bring your posts a little livelier.

  32. Sling TV says:

    I got this web site from my pal who shared with me concerning this web site and now this time I am
    visiting this web site and reading very informative articles here.

  33. Sling TV says:

    This paragraph will assist the internet users for creating new blog or even a blog from start to end.

  34. What’s up, always i used to check website posts here in the early hours in the daylight, since i like to gain knowledge of more and more.

Leave a Reply

Your email address will not be published. Required fields are marked *

To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image