Rivet Apache Directives

These directives are used within the Apache httpd server configuration files to modify Apache Rivet's behavior. Their precedence is as follows: RivetDirConf, RivetUserConf, RivetServerConf, meaning that DirConf will override UserConf, which will in turn override ServerConf.

RivetServerConf (CacheSize | GlobalInitScript | ChildInitScript | ChildExitScript | BeforeScript | AfterScript | ErrorScript | UploadDirectory | UploadMaxSize | UploadFilesToVar | SeperateVirtualInterps)
RivetServerConf specifies a global option that is valid for the whole server.
CacheSize size
Sets the size of the internal page cache, where size is the number of byte-compiled pages to be cached for future use. Default is MaxRequestsPerChild / 5, or 50, if MaxRequestsPerChild is 0.
GlobalInitScript script
Tcl script that is run when each interpreter is initialized. script is an actual Tcl script, so to run a file, you would do:
RivetServerConf GlobalInitScript "source /var/www/foobar.tcl"
ChildInitScript script
Script to be evaluated when each Apache child process is initialized. This is the recommended place to load modules, create global variables, open connections to other facilities (such as databases) and so on.
ChildExitScript script
Script to be evaluated when each Apache child process exits. This is the logical place to clean up resources created in ChildInitScript.
BeforeScript script
Script to be evaluated before each server parsed (.rvt) page. This can be used to create a standard header, for instance. It could also be used to load code that you need for every page, if you don't want to put it in a GlobalInitScript ChildInitScript when you are first developing a web site.
[Note]Note
This code is evaluated at the global level, not inside the request namespace where pages are evaluated.
AfterScript script
Script to be called after each server parsed (.rvt) page.
ErrorScript script
When Rivet encounters an error in a script, it constructs an HTML page with some information about the error, and the script that was being evaluated. If an ErrorScript is specified, it is possible to create custom error pages. This may be useful if you want to make sure that users never view your source code.
UploadDirectory directory
Directory to place uploaded files.
UploadMaxSize size
Maximum size for uploaded files.
UploadFilesToVar (yes | no)
This option controls whether it is possible to upload files to a Tcl variable. If you have a size limit, and don't have to deal with large files, this might be more convenient than sending the data to a file on disk.
SeperateVirtualInterps (yes | no)
If on, Rivet will create a separate Tcl interpreter for each Apache virtual host. This is useful in an ISP type situation where it is desirable to separate clients into separate interpreters, so that they don't accidentally interfere with one another.
RivetDirConf (BeforeScript | AfterScript | ErrorScript | UploadDirectory)
These options are the same as for RivetServerConf, except that they are only valid for the directory where they are specified, and its subdirectories. It may be specified in Directory sections.
RivetUserConf (BeforeScript | AfterScript | ErrorScript | UploadDirectory)
These options are the same as for RivetServerConf, except that they are only valid for the directory where they are specified, and its subdirectories.