For example, these general parameters allow you to change the contents of 404 and 401 responses, to define SUPERUSERS, and to define DEFAULT documents.
Notes: |
|
Syntax: | avalue=sreh2_value(varname,,host_nickname)
This will return the value of the varname variable for the host_nickname host. If you do not specify host_nickname, then the value for the current host (that host to which a request was directed) will be returned. |
Examples: |
val1=sreh2_value('ADDON_DIR',,host_nickname) domd5_is=sreh2_value('DOMD5') |
List of parameters | |
---|---|
The following parameters are set in SREHTTP2.CFG. |
ACCEPT_RANGE |
Enable range requests.
When enabled, SREhttp/2 will look
for range headers, and return the appropriate range of
a document. SREhttp/2 will also send Accept: range headers
on most responses.
| ||||||||||||||||
ALWAYS_GET_PRIVS |
Always get privileges from usernames, and inhouseips, in the users.cfg database.
| ||||||||||||||||
ADD_CHARSET |
For documents with a Content-Type of text/*,
add a charset=xxx phrase to the Content-Type headers.
This is an optional addition, but current practice suggest that this is good and proper.
| ||||||||||||||||
ADD_SLASH |
Check for directory request that does not end with a / If URI appears to refer to a directory (that is, has no .), but does not end with /, SREhttp/2 can append a / and redirect the client to this new URI.
For example:
| ||||||||||||||||
ADDON_DIR |
Specify a host-specific addon directory
If specified, ADDON_DIR is used instead of the default addon directory.
| ||||||||||||||||
CGIBIN_FLAG |
Substring used to idenfity CGI-BIN requests . If a selector contains CGIBIN_FLAG, it is assumed to be a request for a CGI-BIN script. Typically, the selector will start with CGIBIN_FLAG. However, as a means of specifying the directory to find the CGI-BIN script, you can precede the CGI-BIN flag with directory information.
| ||||||||||||||||
CHECK_MIMETYPE_FILE |
To determine the content-type (the mimetype) of a response, SREhttp/2
uses an extension-to-mimetype mapping strategy.
Basically, the selector's extension (i.e.; HTML in FOO.HTML) is compared to a list of mappings, the mapping that contains the selector's extension also contains its mimetype.By default, SREhttp/2 will use a hard-coded set of mappings. You can add to, or override, these defaults, by changing the MIMETYPE.CFG configuration file(s). CHECK_MIMETYPE_FILE is used to control whether SREhttp/2 will always read this MIMETYPE.CFG, or it whether it reads MIMETYPE.CFG only when none of the default mappings work.
| ||||||||||||||||
CHECK_401 |
CHECK_401 is used to deny access to clients with too many logon failures.
The idea is to encumber hackers who are assaulting your site with random username/passwords. With CHECK_401 enabled, SREhttp/2 will check each request (using the client's IP address and the request string) to see if she has several recent failures. If so, access is immediately denied -- no attempt is made to check the username/password. After several minutes, this restriction is relaxed, and the client can try again (since legitimate clients are sometimes clumsy and forgetful). Syntax:
| ||||||||||||||||
DEFAULTS |
List of default names to use when request ends with a / When an URI ends in a /, SREhttp/2 will look for a file named in the DEFAULTS parameter. DEFAULTS should be a space delimited list of file names.
| ||||||||||||||||
DIR_EXCLUSION |
Directory exclusion list. DIR_EXCLUSION is used when a !DIR option in DEFAULTS is used. DIR_EXCLUSION should be a space delimited list of file and subdirectory patterns (may contain wildcards).
| ||||||||||||||||
DOMD5 |
Create an Content-MD5 response header for (almost) all responses If enabled, SREhttp/2 can add a Content-MD5 headers to almost all responses. Content-MD5 headers, which take a moment or two to create, can be used by http/1.1 aware clients as a test for accurate transfer
| ||||||||||||||||
FAIL_FILE |
How to respond when access is denied FAIL_FILE is used when a client is denied access to a resource, as when none of her client-privileges matches a required-privilege. When this happens, FAIL_FILE controls what kind of response is returned to the client.
| ||||||||||||||||
GZIP_THESE |
Do on-the-fly GZIP encoding
This enables on-the-fly gzip encoding as a transfer coding.
| ||||||||||||||||
HTACCESS |
Use, do not use, or disable the HTACCESS access control method.
HTACCESS is a file system method, using .HTACCESS files in
the directory containing a resource. This is in contrast to the
request selector method based on required privileges that are set
in the (possibly host-specific) ATTRIBS.CFG file.
HTACCESS can take the following values:
Note that:
Example: HTACCESS=0
| ||||||||||||||||
HOME_DIR |
The ~ user/home directory The string specified in home_dir replaces a ~ in the selector.
Advanced users option:
If you include a /$/DIRNAME in HOME_DIR, then: Example: | ||||||||||||||||
LOG_SUPPRESS |
Suppress writing of log information
SREhttp/2 can record information to a COMMON, BROWSER, and REFERER log files.
LOG_SUPPRESS can be used to suppress this recording (on a host-specific basis),
| ||||||||||||||||
NOT_FOUND_FILE |
File to use instead of generic 404 "not found" response. Do not include a pathname--SREhttp/2 will use a file of this name in the requested-files own directory, or in the SREHTTP2 directory (if its not available in the own directory).
Notes:
Examples
| ||||||||||||||||
NO_CUSTOM_USERNAME |
To suppress use of the CUSTOM_USERNAME procedure on
a host-specific basis, use NO_CUSTOM_USERNAME:
Notes:
| ||||||||||||||||
PERMISSIONS_DEFAULT |
Default permissions. This is used when the selector does not match any of the selector-specific entries in the default or host-specific ATTRIBS.CFG file(s). PERMISSIONS_DEFAULT can be blank (no default permissions), or it can be a space delimited list of permissions (or just one permission). The currently recognized permissions are: NO_SSI DO_SSI NO_SSP CACHE NOCACHE LOG NO_LOG NO_CUSTOM_USERNAME PUT DELETE NO_DIR HTACCESS NO_HTACCESS
| ||||||||||||||||
PUT_OVERWRITE |
Allow PUT method requests to overwrite pre-existing files
The PUT method, as well some SREhttp/2 addons, allows clients to upload
files to the server. PUT_OVERWRITE controls whether pre-existing files
will be deleted.
| ||||||||||||||||
RECORD_ALL |
Use this to keep a running count for all requested selectors.
These counts will be kept in the
SREHTTP2\WORKDATA\requests.cnt
data series file. Each record in this SRE2003 data series will contain
| ||||||||||||||||
REALM_DEFAULT |
The default realm name The default realm name is displayed on client's authorization screen. This is used if a selector-specific realm has not been specified (in ATTRIBS.CFG). Example: realm_default=Our site | ||||||||||||||||
REQUIRES_DEFAULT |
Default required privileges. This is used when the selector does not match any of the selector-specific entries in the default or host-specific ATTRIBS.CFG file(s). Suggested values are:
Example: requires_default= * | ||||||||||||||||
SSI_EXTENSIONS |
List of "ssi-html" extensions. Documents with these extensions will be processed for server-side-includes. You can also use selector-specific permissions to indicate HTML files that should be processed for SSIs. Example: ssi_extensions=SHTML SHT | ||||||||||||||||
SUPERUSERS |
Space delimited list of "superuser" ip addresses. SUPERUSERS are granted unimpeded access to all resources.
superusers=0 superusers=192.11.5.2
| ||||||||||||||||
VERBOSE |
Status message verbosity Status messages are written to the PMPRINTF window.
|
CFG_DIR -- host-specific configuration directory SUPERCEDING -- host-specific "superceding host" flag
H2_TEMP_DIR -- for temporary files. H2_WORKDATA_DIR -- for counter and other semi-permanent files H2_ADDON_DIR_DEFAULT -- the default addon directory, used as the root directory of host-specific addon-directories. Note that SREhttp/2 use the ADDON_DIR parameter (set in SREHTTP2.CFG) to determine where to look for addons. If the ADDON_DIR is not specified, then H2_ADDON_DIR_DEFAULT is used. H2_CGIBIN_DIR -- default directory for cgi-bin scripts H2_LOG_DIR -- for common log files H2_CFG_DIR -- root directory for SREhttp/2 configuration files H2_HOSTDATA_FILE -- file containing SREhttp/2 host definitions H2_PROCS_DIR -- directory containing pre-response, etc. procs H2_FILECACHE_DIR -- directory for SSI and other "cached files" H2_UPLOAD_DIR -- default directory for file uploads
ADD_SLASH : 1 to treat /abc/def requests as "request for def directory" CSH_INTERP_FILES : Size of the "INTERPRET FILE" cache CSH_H2_HITS : Size of the "SSI repetitive hits" cache CSH_DYNAMIC_PRIVS : Size of the dynamic-privileges cache CSH_CHECK_401 : Size of Check-401 cache DIGEST_AUTH : 1 to enable digest-authentication EMPTY_PATH_OK : 1 to enable support for empty cgi-bin "paths" ENABLE_HTTP11 : 1 to report server as HTTP/1.1 ENABLE_CGI_PIECES : 1 or 2 to enable sending of CGI-BIN output in "pieces" FILEREXX_DLL : 1 if FILEREXX.DLL procedures are availalble, 0 otherwise This should never be 0! HTACCESS_FILE : Name to use for HTACCESS files. The default is .HTACCESS. H2_FILECACHE_MAXFILES : max # of files to store in FILECACHE_DIR (0 means disable) INTERPRET_TYPES : a list matching file extensions to PERL, PHP, and other interpreters KEY_PREFACE : if non-0, add a preface to SSI-html keyphrases MAX_REPEATS : Max # of repeat ATTRIBs lookups, given internal redirection PROXY_CACHE : Controls what Cache-Control headers are added UNZIP_DLL : 1 of UNZIP.DLL procedures are available, 0 otherwise This should never be 0!