VWcms Global Configuration  
 

[PREV][NEXT]

[PRINT]

Global Configuration File

The logical name VWCMS_CONFIG locates the system global configuration file.  For example

$ DEFINE /SYSTEM VWCMS_CONFIG VWCMS_ROOT:[000000]VWCMS.CONF

To make this permanent the name would need to be defined during system startup.  Do not have this located within the VWcms application directory tree or it may be lost at the next VWcms update. It is best located in the suggested VWcms sites root.

VWcms configuration occurs in two phases.  The global configuration file is loaded first, then any site configuration file.  By default site configuration files are _VWCMS.CONF located in the VWcms site directory.  Global directives cannot be used in a site configuration file.  Site directives can be used in the global configuration file where they can configure site characterstics globally, or per-site by selective application using conditional configuration.  If required these characteristics can then be overridden by a subsequently loaded site configuration file.  This approach allows the system adminstrator to set VWcms policy for the site in a way that cannot be overridden by VWcms site administrators who can and should be able to set configuration parameters for their own sites.

Conditional Directives

Much of the flexibility in configuring VWcms sites is derived from the conditional application of directives based on specific request characteristics as represented by CGI variables.  Condition testing is done via "*" wildcard match (matches any zero or more characters) or using regular expression matching (prefix the term with a ^ character).  For example, the regular expression

[if-CGI-server_name]  ^\.example\.net|example\.net
[  site-directory]  VWCMS_ROOT:[THE_EXAMPLE]
[  site-name]  example
[endif]

would match a request to any service at example.net and configure it with the enclosed directives.  The equivalent wildcard match 

[if-CGI-server_name]  *.example.net

would match www.example.net and sales.example.net and products.example.net but not example.net.

An equivalent configuration based on request path

[if-CGI-path_info]  /example/*
[  site-directory]  VWCMS_ROOT:[THE_EXAMPLE]
[  site-name]  example
[endif]

Conditionals may be nested and each must be terminated using an [if-end].

The following table describes the available conditional directives.

[if-CGI-variable_name]    This directive takes a single string parameter and matches it to the specific CGI variable name value.  An empty or non-existant variable tests false.  The directive [if-not-CGI-variable_name] tests if it does not match.
[if-LNM-logical_name]   This directive matches the specified logical name value.  The name is searched for using LNM$FILE_DEV.  A non-existant value tests false.  The directive [if-not-LNM-variable_name] tests if it does not match.
[if-site]   Once the site name is established using the [site-name] directive this directive performs a simple match.  The directive [if-not-site] test if it does not match.
[if-end]   All conditional directives must be matched by a closing end of conditional.  [endif] is a synonym.

These conditional directives are also available for site configuration.

Global Directives

These are used to determine overall site charactersictics, especially the location in the file system.  Global directives cannot be used in a site configuration file.  Directives are case-insensitive.

DirectiveDescriptionDefault
[site-config] alternate name and/or location for site configuration file _VWCMS.CONF
[site-content] alternate name and/or location of site content file _INDEX.HTML
[site-directory]
file-system location for site files (mandatory)
none
[site-domain]
if true then derive the site name from the request host domain name (e.g. both www.example.net and example.net would be "example" but sales.example.net would be "sales")
false
[site-name]
the site name is the leading path component (e.g. "vdub") and overrides [site-domain]
none
[site-origin] sets the origin address ("From:") for emails generated and sent by VWcms none
[site-root] if true VWcms is at the root of the site (see Root Site) false
[site-spawn] if true then allow spawned content (see Include & Insert)
false

[PRINT]  [PRINT]