Chapter 2: Runtime Parameters


The Configuration File

GLACI-HTTPD normally loads its runtime parameters from a configuration file called HTTPD.CFG. This file should be located in the SYS:/ETC directory. Parameters are set with variable/value pairs. A line begins with a variable name, followed by any number of spaces, and then the value to assigned to the variable. Each variable assignment must be on a different line. For example, a config file might look like the following:

# GLACI-HTTPD 3.0 configuration file
# Created automatically on Sat Mar 16 19:01:53 1996

ServerPort 80
ServerName no.name.assigned
DocumentRoot SYS:\ETC\HTDOCS
IconDir SYS:\ETC\ICONS
CGIDir SYS:\ETC\CGI-BIN
TempDir SYS:\TEMP
WelcomePage welcome.htm
HomeDir SYS:\
ImageMapDir SYS:\ETC\IMAGEMAP
HtmlEqualsHtm YES
ListDirs YES
LogFile SYS:\ETC\ERROR.LOG
AccessLog SYS:\ETC\HTTPD.LOG
LogToScreen YES
Use311CGI YES

# IP ACCESS LIST

Web Based Configuration

You can edit the HTTPD.CFG file directly, or you can modify the web server's parameters via a web browser. GLACI-HTTPD version 3.0 includes a Web Based Configuration option that makes it easy to alter your server's runtime parameters. Connect to your web server and specify a document path of /cgi-builtin/menu. For example, if your web server is named www.yourdomain.com, you would connect to the URL http://www.yourdomain.com/cgi-builtin/menu. You will be prompted to enter a username and password. Enter a user name of admin and the password you selected when installing the web server software. You should now be presented with the following options.

Clicking on the EDIT CONFIGURATION SCREEN option will bring up a fill-in form that can be used to modify the runtime parameters. Click the Send button at the bottom of the form to submit your changes. Clicking the Clear button will reset the form back to the current parameter settings. By default, the changes you submit are made active but are NOT saved to the HTTPD.CFG file. If you wish to save your changes, be sure to check the Save Config box at the left of the Send button.

The RELOAD CONFIGURATION FILE will simply load the configuration stored in the HTTPD.CFG file and make it active. This is useful if you have been testing parameter changes and want to return to your normal configuration. It is also useful if you have edited the configuration file with a text editor and wish to reload it without restarting the web server.

The RELOAD MIMETYPE FILE option is usefull if you have made chages to the MIMETYPE.CFG file (such as adding new file extensions or mime types) and wish to make those changes active.

The CHANGE WEB ADMIN PASSWORD option allows you to select a new password for accessing the Web Based Configuration Screens. It will present a fill-in form with three password fields. Enter the old password in the first field and the new password in the second and third fields. You are required to enter the new password twice to verify you typed it correctly. Clicking the Send button will submit the new password and make it active. It also has the side effect of saving the current runtime parameters to the HTTPD.CFG file.

Runtime Parameters Explained

TheMIME Types File

The configuration file for MIME types is named MIMETYPE.CFG and is stored in SYS:\ETC. Each line in the file defines a single MIME type. The leftmost column contains the MIME type string, followed by a space seperated list of filename extensions that should be associated with that MIME type. A line that begins with a '#' character is considered a comment and is ignored. The default MIMETYPE.CFG file that comes with GLACI-HTTPD is probably sufficient for most users, but it can be easily added to if you have special MIME types you wish to accommodate.

Command Line Flags

Normally the HTTPD NLM is loaded by using the LOAD command at the server console prompt. If you installed the NLM in a directory other than SYS:/SYSTEM, then you need to include the full volume and directory in the LOAD command. For example, if you want to load the HTTPD NLM from the /INTERNET directory on the APPS volume, you would type the following:

load apps:/internet/httpd

Otherwise, if HTTPD.NLM is in the SYS:/SYSTEM directory, you need only type:

load httpd

This load command can be placed in your server's AUTOEXEC.NCF file to automatically load the HTTPD NLM whenever your server boots. The LOAD HTTPD command should be placed after the LOAD TCPIP command.

Sometimes it is useful to alter a runtime parameter for a brief time without altering the HTTPD.CFG configuration file. This can be done with command line parameters when the LOAD HTTPD command is executed. To see a listing of the avaliable parameters, simply load the HTTPD.NLM with the -h flag. Thus, if you type the following command:

load httpd -h

The following message is printed to the screen:

USAGE: load httpd [-h] | [-c configfile] [-d directory]
                  [-i icondir ] [-l logfile ] [-w homepage] 

   -c Use a different configuration file 
   -d Set the root document directory 
   -i Set the icon directory 
   -h Print this help message 
   -l Set the log file
   -w Set the file name of the welcome page