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 (see page 5).
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/server-name configures an individual server.
- ns/server/server-name/adp configures AOLserver Dynamic Pages (ADPs) for the server.
- ns/server/server-name/adp/parsers configures ADP parsers.
- ns/server/server-name/db configures database connections used by the server.
- ns/server/server-name/fastpath configures fastpath serving of static files.
- ns/server/server-name/realms configures logging realms for individual modules.
- ns/server/server-name/redirects configures redirects.
- ns/server/server-name/tcl configures Tcl for the server.
- ns/server/server-name/modules lists the modules available to each server.
- ns/server/server-name/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.
- ns/server/server-name/module/nscp configures the control port administration interface.
- ns/server/server-name/module/nscp/users configures the users allowed to access the control port administration interface.
- ns/server/server-name/module/nslog configures the access log module loaded into a server.
- ns/server/server-name/module/nsperm configures the permissions module loaded into a server.
- ns/server/server-name/module/nssock configures the sockets module loaded into a server.
- ns/server/server-name/module/nsvhr configures the virtual host redirection module loaded into a server.
- ns/server/server-name/module/nsvhr/maps configures virtual host redirection mappings.
- ns/server/server-name/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.
- ns/db/driver/extname configures an external database driver.
- ns/db/pools lists the database pools available to AOLserver.
- 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.