Rivet directives are used within the Apache httpd server configuration to set up the environment where Rivet script will be run.
Rivet has 3 general “scope” directives
These directives are applied so that RivetDirConf will override RivetUserConf, which in turn overrides any RivetServerConf directives. Not every configuration directory is meaningful to a scope directive, as shown in the table below. The scope of application of a configuration line is matched also with the context where it appears. Virtual hosts definitions are contexts where rivet configuration lines can appear in many adding further customization to a given virtual host server.
Example of configuration of a web server having independent interpreters for each virtual host, a larger default cache and a specific script to be executed before any templates/scripts located in /var/www/myrivetapp
<IfModule rivet_module> AddType application/x-httpd-rivet .rvt AddType application/x-rivet-tcl .tcl RivetServerConf CacheSize 100 RivetServerConf SeparateVirtualInterps On </IfModule> <Directory /var/www/myrivetapp> RivetDirConf BeforeScript "source /var/www/myrivetapp/before_script.tcl" </Directory>
Configuration Directives | DirConf | UserConf | ServerConf | Virtual Host | Notes |
AbortScript | X | X | X | X | This directive is meaningful with the default request handler. In order to have this triggered by calling ::rivet::abort_page or ::rivet::exit any special request handler should explicitly read this script from the configuration using ::rivet::inspect and evaluate it (see the section called “Apache Child Processes Lifecycle and Request Processing”) |
AfterScript | X | X | X | X | Special request handler scripts should read it from the configuration calling ::rivet::inspect and evaluate it |
AfterEveryScript | X | X | X | X | See notes for the AfterScript directive |
BeforeScript | X | X | X | X | See notes for the AfterScript directive |
CacheSize | X | X | |||
ChildExitScript | X | X | |||
ChildInitScript | X | X | |||
ErrorScript | X | X | X | X | Rivet provides a default error handler. In case you are writing your own request handling procedure you need to call this error handler yourself or develop your application specific error handler to be integrated into the RequestHandler script. See also the notes for the AbortScript and AfterScript directives |
ExportRivetNS | X | X | It can be set in a virtual host configuration if SeparateVirtualInterps is On, otherwise this directive can be safely used at the global level only | ||
GlobalInitScript | X | effective only when SeparateVirtualInterps is Off (default) | |||
ImportRivetNS | X | X | It can be set in a virtual host configuration if SeparateVirtualInterps is On, otherwise this directive can be safely used at the global level only | ||
HonorHeaderOnlyRequests | X | X | |||
MpmBridge | X | global only | |||
RequestHandler | X | X | |||
SeparateChannels | X | global only (DEPRECATED: will be replaced in future versions of Rivet) | |||
SeparateVirtualInterps | X | global only | |||
ServerInitScript | X | global only | |||
SingleThreadExit | X | global only | |||
UploadDirectory | X | X | X | X | |
UploadFilesToVar | X | X | |||
UploadMaxSize | X | X |
script
?script
?script
?script
?Note | |
---|---|
This code is evaluated at the global level, not inside the request namespace where pages are evaluated. |
size
?size
is
the number of byte-compiled pages to be cached for
future use. Default is
MaxRequestsPerChild / 5, or 50,
if MaxRequestsPerChild is 0.
script
?script
?script
?Note | |
---|---|
This option is provided only for compatibility with existing code that assumes mod_rivet commands to reside in the global namespace it could be removed in future versions of Rivet. This option is only available at the global level |
string
?bridge = apr_pstrcat(pool,RIVET_DIR,"/mpm/rivet_",rsc->mpm_bridge,"_mpm.so",NULL);Where RIVET_DIR is the location of the rivet libraries whose definition is controlled by the configure switch --with-rivet-target-dir=DIR. For example
RivetServerConf MpmBridge lazywill cause the rivet_lazy_mpm.so library module to be loaded.
Note | |
---|---|
Note that changing this scripts requires the programmer to understand mod_rivet request processing model. See the request processing manual page |
Note | |
---|---|
This option is implemented in order to have fine-grained 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 |
Note | |
---|---|
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. |
script
?Note | |
---|---|
The default is No for the prefork bridge (loaded by default if the server runs the prefork MPM) and true for the worker and lazy bridges |
directory
?size
?