where ...
You can specify default values, and host-specific values, for both general and selector-specific parameters.
Notes: |
|
Step 1 is described in the next section. Basically, HOSTDATA.CFG is used to tell SREhttp/2 where to find host-specific configuration files, and when to use default parameters.
Step 2 is described in ATTRIBS.HTM. Basically, host-specific versions of ATTRIBS.CFG (and a few other files) can be used to specify general and selector-specific parameters. These parameters control authentication requirements, redirection, file location, and a variety of other features.
HOSTDATA.CFG is a text file that contains multi-line records,
with each line having a mime-like structure.
The basic structure of HOSTDATA.CFG is:
NICK: host_nickname HOST: domain_name or Ip_address (one or several) DATADIR: default_data_directory (for web accessible files) CFG: host_dir SUPERCEDING: a_value NICK: host_nickname_2 HOST: domain_name ... ....Thus, each record in HOSTDATA.CFG ends with a blank line (or with the end of file).
NICK: | Required. A case insensitive host-nickname (which can not contain embedded spaces). host_nicknames are used throughout SREhttp/2 (and SRE2003) to define host specific parameters. |
HOST: | Required. Either one, or several, domain name(s) (such as foo.bar.net) or IP address(es)
(such as 192.155.3.2). If specifying several, seperate each domain name (or IP address)
with one or more spaces. In general, SREhttp/2 will use the Host: header (sent by all modern browsers) to specify which host the client's request is directed to. The value of this Host: header will be compared to the various HOST: entries in HOSTDATA.CFG. If you define several domain names (or IP addresses) with a HOST:, then you are basically declaring that these different domain names (or IP addresses) are merely synonyms for a single site -- the site that is specified by the host nickname. |
DATADIR: | Required. The default data directory for this host. Unless otherwise specified (say, through a selector-specific attribute). all requests to this host are assumed to refer to files that are relative to this host specfic data directory. |
CFG: | Optional. host_dir should be a relative, or an absolute,
directory. If a relative directory, it should be relative to the
SREHTTP2\CFG directory.
If not specified, then there will be no host-specific parameters (for this host_nickname). If specified, then this host_dir directory can contain the following files:
All these files are optional -- if a file is not defined, then there will be no host-specific values for the types of parameters defined in the file. Note: the "defaults" for these five files are in the SREHTTP2\CFG directory. |
SUPERCEDING: | Optional. a_value should be either:
Superceding is used to control when the values of the
default ATTRIBS parameters are used.
For each value, the order of precedence are (with higher rules
used whenever possible).
Reminder: default ATTRIBS parameters are defined in the ATTRIBS.CFG file typically located in SREHTTP2\CFG |
Host: Default
However, just as with host-specific records, you can use CFG to point to a directory that contains the default CFG files.
Host: Default Nick: MAIN Host: 82.55.25.12 Mine.Oursite.net CFG: MY_CFGS Datadir: f:\www\d1 Nick: HISHER_SITE Host: His.Oursite.net Datadir: f:\www\d2 CFG: E:\DATA\HFGS Superceding: 1 Nick: HISHER_SITE Host: Her.Oursite.net Datadir: f:\www\d2 CFG: E:\DATA\HFGS Superceding: 1Note that one could combine the His.Oursite.net and Her.Oursite.net entries into one entry