-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
102 lines (87 loc) · 3.91 KB
/
README
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
I. INTRODUCTION
This is Rivet/CGI. It is useful for running Rivet applications as a normal
process instead of under mod_rivet. The bulk of this code was written by
Mr. David Welton as part of the orginal Rivet project.
The CGI integration was done by Mr. Roy Keene <[email protected]>
This package is maintained by Mr. Roy Keene, not Mr. David Welton.
************************************************************************
II. USAGE
1. Rivet as CGI with Apache 2.x
a. Completely remove mod_rivet
b. Compile "rivet.cgi" (found in the "bin/" directory)
i. $ cd bin
ii. $ make rivet.cgi
iii. $ cd ..
c. Make the directory "/usr/lib/rivet0.5.0"
i. # mkdir -p /usr/lib/rivet0.5.0
d. Make the directory "/usr/lib/rivet0.5.0/cgi-bin"
i. # mkdir -p /usr/lib/rivet0.5.0/cgi-bin
e. Copy "rivet.cgi" (from above) to "/usr/lib/rivet0.5.0/cgi-bin/"
i. # cp bin/rivet.cgi /usr/lib/rivet0.5.0/cgi-bin/
f. Setup Apache to allow "*.rvt" files to be parsed by this executable
i. Apache 2.x Configuration:
AddHandler rivet-cgi .rvt
Action rivet-cgi /RIVET-CGI-HASH-IGNORE-d9a9ef3f27db4d8163deee1421e06f00/rivet.cgi
<IfModule alias_module>
ScriptAlias /RIVET-CGI-HASH-IGNORE-d9a9ef3f27db4d8163deee1421e06f00/ "/usr/lib/rivet0.5.0/cgi-bin/"
<Directory "/usr/lib/rivet0.5.0/cgi-bin">
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
<Files ~ "\.rvt$">
AcceptPathInfo On
</Files>
</IfModule>
g. Build optimized Rivet parser ("librivetparser.so")
i. $ cd lib/src
ii. $ make
iii. $ cd ../..
h. Copy the directories "lib", "packages", "rivet-tcl" to /usr/lib/rivet0.5.0
i. # cp -rp lib packages rivet-tcl /usr/lib/rivet0.5.0/
i. Remove /usr/lib/rivet0.5.0/lib/src
i. # rm -rf /usr/lib/rivet0.5.0/lib/src
2. Rivet as CGI by converting directory tree into a Starkit.
a. For more information on Starkits, see this page:
http://www.rkeene.org/projects/info/wiki.cgi/10
b. The advantage to this technique is that your entire application
is contained in a single file that does not need to be unpacked
by the end user (though they can still do so if they wish).
c. Further, the Starkit can be turned into a native executable for
a particular platform (a Starpack) further reducing the
requirements on the end user platform.
d. Creating a Starkit using "rivet2starkit" is easy:
i. $ bin/rivet2starkit <outputStarkit> <inputDirectory>
[<inputDirectory>...]
e. If a ".htaccess" file is found anywhere, it is interpreted to
mean "Deny from all"
f. Rivet files (identified by their filename ending in ".rvt") are
interpreted using the normal Rivet rules (unless excluded by the
above restriction using ".htaccess" files)
g. All other files are transmitted with a MIME type determined by
their "file extension" (unless excluded as above)
h. ** NOTE **: Starpacks (that is native executables) created using
current Tclkits (that is native executables) contain a security
issue when used as a CGI under Apache:
http://code.google.com/p/tclkit/issues/detail?id=1
i. Enable "AcceptPathInfo" in Apache if it is disabled (default is
Enabled) for CGI.
3. Rivet as standalone HTTP server
a. Same as #2, except for items "h" and "i";
b. Run resultant executable or starkit with "--help" for more
information
************************************************************************
III. HISTORICAL
Original README Contents
###
## rivet/ - Initialization code for the Rivet Apache module.
##
###
init.tcl - Contains the initialization routines for Rivet in a
::Rivet namespace.
packages - Contains packages for use with Rivet. Place any new packages or
procedure libraries in this directory.
rivet-tcl - Contains .tcl files for procedures in Rivet. Place new commands
to Rivet in this directory.
packages-local - If it exists, a directory of local packages.