AOLserver Configuration Guide

$Header: /cvsroot/aolserver/aolserver.com/docs/admin/config.html,v 1.3 2002/09/26 19:51:32 kriston Exp $

AOLserver Configuration

Configuration File Structure

Configuration File Hierarchy

Configuration File Reference

Example Configuration Files

Detailed Description of Configuration Parameters

Annotated AOLserver Configuration Reference "config-reference.tcl"

AOLserver Configuration

AOLserver has many configurable parameters, all of which are set in the AOLserver configuration file. This chapter provides a reference of the configuration file structure and parameters so that you can edit the configuration file directly.

By modifying and/or adding AOLserver configuration parameters, you can:
* Define multiple servers, one of which will run within each running AOLserver process.


* Define multiple database pools with different data sources that can be accessed by any or all of the servers.


* Configure various AOLserver capabilities or optionally-loaded modules for each of the servers.

What is a database pool?

A database pool is a set of connections to a database. AOLserver currently supports direct connections to the SOLID and Postgres databases. AOLserver also supports an external connection to Sybase. Third-party database drivers are available for Oracle, Informix, and InterBase. As far as configuration is concerned, you simply specify a database (or data source) that you want AOLserver to access. AOLserver then manages a set of connections to the database that it uses internally to efficiently process database operations. You can also access these connections directly through the Tcl and C interfaces.

What are the default AOLserver capabilities?

The following capabilites are provided by default for every server and can be configured by manually editing the configuration file.


* ADPs: This capability allows you to embed Tcl scripts within an HTML page. The pages are parsed and run on the server when the page is accessed.


* db: This capability allows you to use AOLserver's database services.


* tcl: This capability allows you to use AOLserver's Tcl API. See the Tcl Developer's Guide for information on Tcl.

What is an AOLserver module?

AOLserver modules are shared libraries or dynamically-linked libraries that provide specific sets of capabilities that you can load in your servers. The following modules are provided:


* nscgi: This capability allows you to run CGI programs from AOLserver.


* nscp: This module enables the control port interface that allows you to administer a running server.


* nslog: This module enables access logging in the CERN Common Log Format. The nslog module can also log the Refer and User-Agent client headers.


* nsperm: This module enables access control capabilities -- defining users, groups, and permissions.


* nssock: This module enables communications using ordinary TCP/IP Internet sockets.


* nsvhr: This module enables virtual host redirection.


* nsunix: This module enables communications using the nsvhr module to proxy over a UNIX domain socket.

Configuration File Structure

This section describes the format of the configuration file and provides detailed information on individual AOLserver parameters.

The configuration file is normally the nsd.tcl file in the AOLserver home directory (the directory where AOLserver was installed). You must specify the configuration file when you start up AOLserver with the -c command line flag.

The configuration file is a Tcl file that can be modified with a text editor such as vi or emacs on Unix. The file is made up of named sections with one or more parameters. Each section heading is of the form "ns/...". Each parameter is composed of a parameter name and a parameter value. The parameters of a section continue until a new section is defined or until the end of the file.

The ns_section and ns_param Tcl functions are used to define each section and the parameters for each section in the configuration file. The general format of the configuration file is as follows: ns_section "ns/..." ns_param param-name param-value ...

Configuration file examples begin on page 79. The default configuration file is shown on page 79.

Configuration File Hierarchy

Although there are a large number of configurable parameters for AOLserver, most of them are not required. Also, the parameters are organized into a hierarchy branching off of the following main sections, letting you configure AOLserver at a global level, configure each server, and configure each database you will be accessing. This hierarchy of sections allows you maximum flexibility to provide exactly the capabilities you need on each server, including where pages will be stored and which databases will be accessible.


* Parameters: This part of the configuration file contains parameters that apply to the AOLserver process: + ns/parameters specifies parameters such as the AOLserver home directory.


* MIME Types: This part of the configuration file lists global MIME types. + ns/mimetypes maps file name extensions to content-type headers.


* Servers: This part of the configuration file configures one or more servers, one of which that can be run within each AOLserver process. It is the top level in a hierarchy of sections for each server. + ns/servers lists and names all of the servers. + ns/server/servername configures an individual server. + ns/server/servername/adp configures AOLserver Dynamic Pages (ADPs) for the server. + ns/server/servername/adp/parsers configures ADP parsers. + ns/server/servername/db configures database connections used by the server. + ns/server/servername/fastpath configures fastpath serving of static files. + ns/server/servername/realms configures logging realms for individual modules. + ns/server/servername/redirects configures redirects. + ns/server/servername/tcl configures Tcl for the server. + ns/server/servername/modules lists the modules available to each server. o ns/server/servername/module/nscgi configures CGI (Common Gateway Interface) for the server. See also the CGI interpreters and CGI environment configuration sections on page 48 for additional CGI configuration. o ns/server/servername/module/nscp configures the control port administration interface. o ns/server/servername/module/nscp/users configures the users allowed to access the control port administration interface. o ns/server/servername/module/nslog configures the access log module loaded into a server. o ns/server/servername/module/nsperm configures the permissions module loaded into a server. o ns/server/servername/module/nssock configures the sockets module loaded into a server. o ns/server/servername/module/nsvhr configures the virtual host redirection module loaded into a server. o ns/server/servername/module/nsvhr/maps configures virtual host redirection mappings. o ns/server/servername/module/nsunix configures a UNIX domain socket driver.


* Database Drivers and Pools: This part of the configuration file configures the database drivers (the type of database you will be using) and the database pools (connections to the database). + ns/db/drivers lists the database drivers available to AOLserver. Currently internal database drivers are available for SOLID and Postgres. An external database driver is available for Sybase. o ns/db/driver/extname configures an external database driver. + ns/db/pools lists the database pools available to AOLserver. o ns/db/pool/pool-name configures a database pool, which determines the database to access and how many connections there will be to it.


* CGI Interpreters: This section allows you to configure the interpreters to execute for CGI scripts that end with certain file extensions. For example, you can configure the perl.exe interpreter to be invoked for all CGI's that end in .pl. + ns/interps/interps-name defines an interps section for CGI modules.


* CGI Environment: This section allows you to configure environment variables in addition to the standard CGI environment variables for all CGI's or specific CGI interpreters. + ns/environment/environment-name defines an environment section for CGI modules.


* SGI IRIX Sproc-based Threads: This section configures sproc-based threads on either IRIX 5.3 or 6.2 (not the pthread-based approach available on IRIX 6.2). + ns/threads configures sproc-based threads.

The parameters for each of the configuration file sections are described below.

Configuration File Reference

The following link describes all the possible parameters that can be set in each section of the configuration file. Note that some sections are not necessary at all if a specific capability is not included. For example, you don't need a section configuring the nslog module for a server if that server does not include the nslog module.

Detailed Description of Configuration Parameters

Annotated AOLserver Configuration Reference "config-reference.tcl"

Note on Boolean Parameter Values:

There are several ways to specify a boolean parameter value. The reference tables below use "on" for true and "off" for false. However, any of the following values are valid:

Boolean Value

Equivalent Boolean Values

on

y, yes, t, true, 1 (one)

off

n, no, f, false, 0 (zero)

Example Configuration Files

Default Configuration File

The default sample-config.tcl comes with AOLserver. There is one server defined, server1, which contains the nscp, nslog, and nssock modules. You can define multiple servers, but only one of them can be run with each command line execution. All this information is defined at the top of the file.

sample-config.tcl

Configuration for Multiple Database Pools

This configuration file defines one server named default and two database pools named defdb and otherdb. A few things to note about this configuration file are:

SOLID and Postgres database pools: The defdb database pool is associated with an SOLID database, and the otherdb database pool is associated with a Postgres database. (See the driver parameters in the ns/db/pool/pool-name sections.)

SOLID and Postgres drivers: The drivers used for all of the defined database pools are listed in the ns/db/drivers section.

Database pools accessible by each server: The pools parameter in the ns/server/default/db section specifies which database pool the default server has access to. In this example, the default server can access both the otherdb and the defdb database pools.

sample-db-config.tcl

Configuration Reference

Detailed Description of Configuration Parameters

Annotated AOLserver Configuration Reference "config-reference.tcl"