Code Monkey home page Code Monkey logo

rivetcgi's Introduction

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.

rivetcgi's People

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.