Rivet directives are used within the Apache httpd server configuration to set up the environment where Rivet script will be run. Their precedence is as follows: RivetDirConf, RivetUserConf, RivetServerConf, meaning that DirConf will override UserConf, which will in turn override ServerConf.
The directive ServerInitScript plays a special role since the script runs within the master interpreter, an interpreter created before the Apache parent process spawns the children that actually will serve the requests coming from the network. During this stage Apache is still running as a single process, so this is the right place for doing initializations or loading packages. Since this script will be running in a single process environment (from the Apache point of view) ServerInitScript is also the right place for doing anything needs to avoid resource concurrency among processes (e.g. the creation and initialization of an IPC system)
sizeis the number of byte-compiled pages to be cached for future use. Default is MaxRequestsPerChild / 5, or 50, if MaxRequestsPerChild is 0.
scriptis an actual Tcl script, so to run a file, you would do:
RivetServerConf GlobalInitScript "source /var/www/foobar.tcl"
|This code is evaluated at the global level, not inside the request namespace where pages are evaluated.|
|This option is, by nature, only available at the global level. By enabling SeparateVirtualInterps you must rely only on ChildInitScript to initialize the interpreters. Don't expect the initialization done in ServerInitScript and GlobalInitScript to be handed down to the slave interpreters that are private to each configured virtual host.|
|This option is implemented in order to have fine grain control over mod_rivet. In nearly all practical cases you won't need to change Rivet Channel (stdout) settings for different applications by calling fconfigure stdout ..... This option is, by nature, only available at the global level and has effect only if also SeparateVirtualInterps is set|