-
Notifications
You must be signed in to change notification settings - Fork 0
Rivet (Tcl Templating -- the Tcl answer to PHP) as a CGI, or a standalone HTTP servers.
rkeene/RivetCGI
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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.
About
Rivet (Tcl Templating -- the Tcl answer to PHP) as a CGI, or a standalone HTTP servers.
Resources
Stars
Watchers
Forks
Packages 0
No packages published