summaryrefslogtreecommitdiff
path: root/doc/trigger_b4_dl.txt
blob: f7e4875c39e0912cb0e3b42a21c218759651fa53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
=======================
Trigger before Download
=======================

-------------------------
Module: mod_trigger_b4_dl
-------------------------

:Author: Jan Kneschke
:Date: $Date: 2004/11/03 22:26:05 $
:Revision: $Revision: 1.2 $

:abstract:
  another anti hot-linking module
  
.. meta::
  :keywords: lighttpd, hot-linking, deep-linking
  
.. contents:: Table of Contents

Description
===========

Anti Hotlinking:

 * if user requests ''download-url'' directly the request is denied and he is redirected to ''deny-url'
 * if user visits ''trigger-url'' before requesting ''download-url'' access is granted
 * if user visits ''download-url'' again after ''trigger-timeout'' has run down to the request is denied and he is redirected to ''deny-url''

The storage for the trigger information is either stored locally in a gdbm file or remotly in memcached.

Requirements
------------

 * libpcre
 * libgdbm
 * libmemcache

Options
=======

::

  trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db"
  trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
  trigger-before-download.trigger-url = "^/trigger/"
  trigger-before-download.download-url = "^/download/"
  trigger-before-download.deny-url = "http://192.168.1.5:1025/index.html"
  trigger-before-download.trigger-timeout = 10

If both trigger-before-download.gdbm-filename and 
trigger-before-download.memcache-hosts is set gdbm will be prefered.

Installation
============

memcached should be started with the option -M as we don't want to remove entry if the memory is full.