Configuration File Structure
Normally, you will never need to look at the configuration file, because
you can modify most of the parameters using the setup server described in
"The Setup Server" section. This section
describes the format of the file and provides detailed information on individual
AOLserver parameters.
The configuration file is normally the
nsd.ini
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 on either Unix or Windows
NT, or when you manually install the Windows NT AOLserver service.
The configuration file is in the same format as a Microsoft
Windows .INI file, a plain text file that can be modified with an ordinary
text editor such as vi or emacs on Unix or Notepad on
Windows. 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, an equal sign, and a parameter value. The parameters
of a section continue until a new section is defined or until the end of
the file.
In most cases, AOLserver ignores the case of both the
parameter names and their values, but application programs can be written
to access configuration data case-sensitively. (See the Tcl API and the C
API chapters for more information.)
The AOLserver Windows NT SETUP program and the Unix
nsbootstrap
script create a minimal nsd.ini
file
for you to customize.
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 virtual 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
virtual 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.
-
Setup Server: This part of the configuration file contains parameters
that apply to the built-in setup server:
-
[ns/setup] specifies parameters for the setup server.
-
Servers: This part of the configuration file configures the virtual
servers that will be running within the AOLserver process. It is the top
level in a hierarchy of sections for each server.
-
[ns/servers] lists and names all of the virtual servers.
-
[ns/server/server-name] configures an individual virtual
server.
-
[ns/server/server-name/aliases] configures URL-to-file
mapping for the virtual server.
-
[ns/server/server-name/cgi] configures CGI (Common Gateway
Interface) for the virtual server. See also the CGI interpreters and CGI
environment configuration sections. For example, you can configure the perl.exe
interpreter to be invoked for all CGI's that end in .pl. for additional CGI
configuration.
-
[ns/server/server-name/db] configures database connections
used by the virtual server.
-
[ns/server/server-name/mimeicons] specifies
.gif
icon files for each MIME type used when building directory
listings.
-
[ns/server/server-name/mimetypes] maps file name extensions
to content-type headers.
-
[ns/server/server-name/shtml] configures server-parsed
HTML for the virutal server.
-
[ns/server/server-name/tcl] configures Tcl for the virtual
server.
-
[ns/server/server-name/modules] lists the modules available
to each virtual server.
-
[ns/server/server-name/module/nslog] configures the
access log module loaded into a virtual server.
-
[ns/server/server-name/module/nsnlog] configures the
network logging module loaded into a virtual server.
-
[ns/server/server-name/module/nsperm] configures the
permissions module loaded into a virtual server.
-
[ns/server/server-name/module/nssock] configures the
sockets module loaded into a virtual server.
-
[ns/server/server-name/module/nsssl] configures the
SSL (Secure Sockets Layer) module loaded into a virtual server.
-
[ns/server/server-name/module/nstext] configures the
full text module loaded into a virtual server.
-
[ns/server/server-name/module/tclstate] configures a
Tcl-only module for maintaining state loaded into a virtual
server.
-
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 Illustra and ODBC.
External database drivers are available for Illustra and
Sybase.
-
[ns/db/driver/illustra] configures the Illustra database driver. (The
ODBC driver needs no configuration.)
-
[ns/db/driver/extill] configures an external database driver for
Illustra.
-
[ns/db/driver/extsyb] configures an external database driver for
Sybase.
-
[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). The parameters in this section are not accessible through the
setup server and must be set directly in the configuration
file.
-
[ns/threads] configures sproc-based threads.
The parameters for each of the configuration file sections are described
below. Starting on Example Configuration Files
of this chapter, there are example configuration files for various AOLserver
capabilities.