Configuring the server
The OSU web server has many configuration options, which are controlled
by a set configuration files (.conf files in the www_system directory).
The .conf files have a particular format
that is parsed by the server at startup/restart to control most aspects of its
operations, such as:
- Network-related parameters (e.g. preferred hostname)
- Logging/statistics tracking options
- Mapping files types to their corresponding MIME type
- Script operation
- Mapping URL paths to VMS directories
- Marking particular URL paths for restricted access (protection)
The default configuration files are designed to be editted by the
servermaint script (see below) rather than by a text editor, although they
can be edited 'by hand' if you insist.
ServerMaint script
The servermaint script is a C program, linked against CGILIB, that uses an
associated template file (.servermaint) to present the configuration data as
an HTML form. The template allows you to build an interface with semantics
(e.g. checkboxes to enable features) that don't match the configuration file
syntax.
Both the user guide and
default configuration file HTTP_MAIN.CONF
by default authorize username 'SERVER' with password 'MAINT' on servers
running on non-privileged ports (e.g. 8000). When running the server on a
privileged port (e.g. 80), you must edit the following 2 files:
- Servermaint_protection.conf
- Uncomment the protect rule, this
forces the server to use servermaint.prot to control access to the servermaint
script.
- Servermaint.prot
- Customize to the usernames and sub-nets you wish to
allow access. Note that if you use '*' as the password, you must install
the authenticator with privileges as well (by modifying http_systartup.com).
As your first exercise in using servermaint, you should change the
'rootpage' in HTTP_PATHS.CONF
to /demo/index.html (the original default
page for the server).
ServerMaint private directives
The servermaint script stores 2 pieces of the meta-data needed for its
operation in the configuration file through the use of 2 additional
pre-processor directives (declared via a .ignore rule):
-
- .authorize user[@host] [password]
- Authorizes who can access the configuration file via this script. A
configuration file may specify many authorized users.
- .form template-file
- Specifies the template file associated with this configuration file, the
configuration file must contain exactly one .form directive to be usable by
the servermaint script.
Bypassing Servermaint
If you prefer not to use the servermaint script and edit the configuration
file directly, the convert_config.com procedure will read a configuration
file and generate a new configuration file with the pre-processor rules
expanded. Note that a converted file cannot be mechanically converted
back to the pre-processed form. See the comments at the top of
convert_config.com for details.
David Jones, The Ohio State University