Apache Rivet Installation

  1. Check Dependencies

    To install Rivet, you will need Tcl 8.4 or greater. Rivet can be compiled to work with either Apache 1.3.xx or Apache 2.2.xx server. It is known to run on Linux, FreeBSD, OpenBSD, Solaris and HPUX. Windows NT is also possible - please see the directions in the distribution.

  2. Get Rivet

    Download the sources at http://tcl.apache.org/rivet/download.html. Currently the only way to obtain Rivet. In the future, we hope to have a FreeBSD port, Debian package, RPM's, and windows binaries.

  3. Install Tcl

    If you don't have Tcl already, you need it! If you already have it, you should just be able to use your system Tcl as long as it is recent. You can tell Rivet build scripts where Tcl is via the --with-tcl option to configure (see below).

  4. Get and Install Apache Sources

    Rivet needs some Apache include (.h) files in order to build. The easiest way to get them is to download the source code of the Apache web server, although some systems (Debian GNU/Linux for example) make it possible to install only the headers and other development files. If you intend to build Rivet statically (compiled into the Apache web server instead of loaded dynamically), you definitely need the sources. We recommend that you build Rivet as a loadable 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/.

  5. Uncompress Sources

    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

  6. Building Rivet

    1. On Linux or Unix systems, Rivet uses the standard ./configure ; make ; make install technique.

      There are several rivet specific options to configure that might be useful (or needed):

      --with-tcl
      This points to the directory where the tclConfig.sh file is located.
      --with-tclsh
      This points to the location of the tclsh executable.
      --with-apxs
      The location of the apxs program that provides information about the configuration and compilation options of Apache modules.
      --with-apache-version=[1|2]
      This option tells the build scripts whether you want to build Rivet for the Apache 1.x or Apache 2.x server.
      --with-apache-include[=DIR]
      Locates the Apache include files on your computer, if they're not in standard directory.
      --enable-version-display=[yes|no]
      This option enables Rivet to display its version in the logfiles when Apache is started. The default is to keep Rivet version hidden.
      --with-rivet-target-dir=DIR
      This option tells the install script where Rivet's Tcl packages have to be copied.

      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
      	
    2. Run make

      At this point, you are ready to run make, which should run to completion without any errors (a warning or two is ok, generally).

    3. Install

      Now, you are ready to run the make install to install the resulting files. This should copy the shared object (like mod_rivet.so, if one was successfully created, into Apache's libexec directory, as well as install some support scripts and various code.

  7. Apache Configuration Files

    Rivet is relatively easy to configure - we start off by adding the module itself:

    LoadModule rivet_module	/usr/lib/apache2/modules/mod_rivet.so
    	

    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 .rvt and .tcl 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”.