Introduction

The hardest task a new webmaster faces is comprehending the configuration files that control the server's operation. A standard feature of most servers is a web-based mechanism for managing the server. I've resisted making web-based management a priority of the OSU server because I feel once the desired configuration is acheived, the bulk of work shifts to maintaining the served content rather the configuration.

Even though I don't intend to make web-based managment native to the server, I have made experiments in scripts to help manage the configuration file.

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 a 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' and 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

Starting with 2.1 of the server, http_main.conf is the default configuration file, it combines http_sample_home.conf and http_params.conf.

Configuration File Extensions

To allow the script to correlate the template with the configuration file, I've extended the latter's syntax to include pre-processor-like directives. There are 5 general directives that the server actively executes and an arbitirary number of additional directives for private use by maintenance scripts. All directives begin with a period.

General Pre-processor directives:

.define symbol value
Defines a symbol for use with the .expand command
.expand command-template
Scans command-template and replaces any tokens of form $symbol with the definition from a previous .define directive. The completed command is then interpreted as a normal command.
.ignore directive-list
Defines additional directives that server will recognize but ignore ( generating no errors). This provides a means for additional information needed by the maintainence script (e.g. .authorize records) to be saved in the configuration file
.iterate command-template
Save the command template for reference by subsequent .next directives, build a dummy argument list for each token of form $name.
.next arguments
Insert arguments into dummy argument list (in order) and perform .expand on the saved command-tempate.

ServerMaint private directives:
.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.

David Jones, The Ohio State University