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 | |
AfterScript | X | X | X | X | |
AfterEveryScript | X | X | X | X | |
BeforeScript | X | X | X | X | |
CacheSize | X | ||||
ChildExitScript | X | ||||
ChildInitScript | X | ||||
ErrorScript | X | X | X | X | |
ExportRivetNS | X | ||||
GlobalInitScript | X | effective only when SeparateVirtualInterps is Off (default) | |||
ImportRivetNS | X | ||||
HonorHeaderOnlyRequests | X | ||||
MpmBridge | X | global setting | |||
RequestHandler | X | X | |||
SeparateChannels | X | global setting | |||
SeparateVirtualInterps | X | global setting | |||
ServerInitScript | X | ||||
UploadDirectory | X | X | X | ||
UploadFilesToVar | 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's utterly discouraged to use it and it could be removed in future versions of Rivet This option is, by nature, 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 configuration argument <term>--with-rivet-target-dir=DIR</term>. For example
RivetServerConf MpmBridge lazywill cause the rivet_lazy_mpm.so library module to be loaded. If such library does not exists mod_rivet tries to check if such definition is the fully qualified path to such MPM bridge. If this fails the module causes the web server to stop with an error.
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
?directory
?size
?