Rivet 2.2 runs with the Apache 2.2.x and 2.4.x HTTP web server. It is known to build and run on various Linux distributions (Debian & Ubuntu, Redhat, SuSE and CentOS), FreeBSD and OpenBSD. For some of these Unix-like operative systems binary packages are already available for download.
Currently there is no way to run Apache Rivet 2.2 on Windows© because Rivet currently requires the prefork, which is supported only on Unix/Linux systems. Efforts are under way to extend the support to the worker and the winnt MPMs. Check our development mailing list for the latests updates about Rivet development
If you need to compile Apache Rivet yourself this is the procedure to follow
Installing Rivet is about endowing the Apache HTTP webserver with the ability of running scripts written with the Tcl programming language. Therefore the Tcl shell (tclsh), its runtime and development libraries (≥8.5.10) have to be installed. Building Rivet you will have to tell the scripts where the Tcl libraries are located via the --with-tcl option to configure (see below).
Download the sources at http://tcl.apache.org/rivet/html/download.html.
Get and Install Apache Sources
Rivet needs some of the include (.h) files shipped with the webserver source code. The easiest way to get them is to download the Apache source. If can build Rivet either statically (compiled into the Apache web server instead of loaded dynamically) or dynamically (as a loadable shared library). We recommend that you build Rivet as a shared library, for maximum flexibility, meaning that you also build Apache to be able to load modules. Other than that, the default Apache install is fine. We will tell Rivet where it is located via the --with-apxs option to configure (see below).
The source code for the Apache web server may be found by following the links here: http://httpd.apache.org/.
We will assume that you have Apache installed at this point. You must uncompress the Rivet sources in the directory where you wish to compile them.
gunzip rivet-X.X.X.tar.gz tar -xvf rivet-X.X.X.tar.gz
On Linux or Unix systems, Rivet uses the standard ./configure ; make ; make install sequence which installs to their target directories the Apache module, the binary libraries and the Tcl code
There are several rivet specific options to configure that might be useful (or needed):
tclConfig.shfile is located.
apxsprogram that provides information about the configuration and compilation options of Apache modules.
::rivetnamespace. With this option you may prevent it thus forcing the programmer to fully qualify these commands
::rivet). This switch overrides the default and prevents the import into the global namespace
Example: configuring the build system to compile Rivet for an apache 2.x server, using tcl8.5 and specifying a custom name for the apxs program.
./configure --with-tcl=/usr/lib/tcl8.5/ --with-tclsh=/usr/bin/tclsh8.5 \ --with-apxs=/usr/bin/apxs2 --with-apache=/usr --with-apache-version=2
At this point, you are ready to run make, which should run to completion without any errors (a warning or two is ok, generally).
Now, you are ready to run the
to install the resulting files. The
actually fires the
install-packages targets which in turn
copy the binary modules and Tcl packages to their destination
directories. This commands create a functional Rivet environment with its
Apache Configuration Files
Rivet is relatively easy to configure - we start off by adding the module itself:
This tells Apache to load the Rivet shared object, wherever it happens to reside on your file system. Now we have to tell Apache what kind of files are "Rivet" files and how to process them:
AddType application/x-httpd-rivet .rvt AddType application/x-rivet-tcl .tcl
These tell Apache to process files with the
extensions as Rivet files.
The characters encoding can be changed using the header type command, but you can also change the default charset for the whole site:
AddType 'application/x-httpd-rivet;charset=utf-8' rvt
All the pages generated by Rivet on this site will be sent with a Content-Type:'text/html;charset=utf-8' header.
You may also wish to use Rivet files as index files for directories. In that case, you would do the following:
DirectoryIndex index.html index.htm index.shtml index.cgi index.tcl index.rvt
For other directives that Rivet provides for Apache configuration, please see the section called “Rivet Apache Directives”.