File: INSTALL.WN

package info (click to toggle)
sugarplum 0.9.10-18
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 228 kB
  • ctags: 15
  • sloc: perl: 384; sh: 50; makefile: 14
file content (29 lines) | stat: -rw-r--r-- 1,040 bytes parent folder | download | duplicates (5)
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

Contributed by Jasper Jongmans <jjongmans/at/aprogas.cx>:

First create a file that contains the list of "bad" user-agents (eg.
/usr/local/etc/sugarplum/badagents). The format of this file is one
grep(1)-like regexp per line.
Next insert the following text at the top of all your HTML files you want
to "protect":
 
<!-- #if UA file="sugarplum/badagents" -->
<!-- #redirect = "http://www.yoursite.tld/sugarplum/" -->
<!-- #endif -->

Note that the file specified in the #if directive's file attribute is
relative to the WN server root dir (e.g. /var/www).

It is important that you do not have any lines (also no blank lines)
above this.

The last step is telling WN to parse the HTML files. Add Attributes=parse
for each file record or Default-Attributes=parse in the directory record
of index.wn.

Make sure that the badagents file is readable by the user as which WN
server runs (try something like:
echo '[ -r /usr/local/etc/sugarplum/badagents ] && echo good || echo bad' | su -m wn).

$Id: INSTALL.WN 44 2003-02-01 22:56:20Z aqua $