[ Previous ] [ Contents ] [ Index ] [ Next ]

Configuration File Reference

The following tables describe 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.

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)

The Parameters Section

ns/parameters

This section is used to specify global AOLserver parameters.

Parameter

Default Value

Description

AuxConfigDir

A directory containing additional configuration files whose contents will be merged with the primary configuration file. After loading the primary configuration file (the value of the -c parameter on the nsd command line, usually nsd.ini), any files in the directory specified by AuxConfigDir with an .ini extension are loaded in alphabetical order.

If a configuration file section in an auxiliary configuration file already exists in the primary configuration file, the key/value pairs in that section are added to the  end of the existing section from the primary configuration file. If, as a  result, a specific parameter is set more than once in a section, the first setting will be used. Therefore, a parameter set in an auxiliary configuration file cannot override the same parameter set in the primary configuration file or in an auxiliary configuration file loaded before it.  Some parameters, such as the Map parameters in  the CGI section, can have multiple settings.  In this case, all Map parameter settings will be used.

CheckExitCode

off

Boolean value. If set to on, an error is reported when a child process exits with a non-zero status.

CrashCmd

The name of a Tcl function which, when executed, will crash the server.

Debug

off

Boolean value. If set to on, debug messages will be printed to the global server log. Note: Setting Debug on will produce a large amount of debug output.

DNSCache

on

Boolean. If set to on, enables DNS cache to speed lookup of remote IP addresses. Since the DNS cache can dramatically speed lookup time, especially in the case of a busy server with the nslog module set to resolve host names, it is recommended that DNSCache be left on.

DNSCacheTimeout

60

The number of minutes between cache purges for the DNS cache.

Gid

(If neither Gid nor Group is set, the default group of the user specified by the User parameter is used.)

Unix group number.

Group

(If neither Gid nor Group is set, the default group of the user specified by the User parameter is used.)

Unix group name. This parameter is ignored if the gid parameter is set.

Home

The AOLserver home directory (the directory where AOLserver was installed). This parameter is required.

ListenBacklog

32

The maximum length of the queue of pending connections.

LogMaxBackup

10

The maximum number of server log backup files.

LogRoll

on

Boolean value. If set to on, the server log file will be rolled on a SIGHUP.

MailHost

localhost

The SMTP server AOLserver should use when sending email using the Tcl ns_sendmail function.

PidFile

serverhome/log

/nspid.setup-server-port

The pathname of the file where the server puts its pid.

ServerLog

/log/server.log under the AOLserver home directory

The file to contain any notices, warnings, or errors generated by AOLserver if AOLserver is run as a background process. If AOLserver is run in the foreground, messages are written to standard output, and this parameter is ignored.

SockNoWarn

off

Boolean value. If set to on, errors encountered while making outgoing tcp connections will be logged.

StackSize

SGI and DEC OSF: 32000

All others: the operating system default

The thread stack size. You may need to increase this parameter if an AOLserver request function or Tcl script is deeply nested, exhausting the stack space of the thread. If AOLserver is configured to use ADPs, for example, you may want to increase the thread stack size to 128K or more.

Uid

Unix uid which can be set instead of setting the User parameter.

User

The user name that AOLserver is to be run as. If you start the AOLserver as the root user, you must set this parameter. If you have selected a port number below 1024 (a "privileged" port), you will need to start the AOLserver as the "root" and specify a Unix user for the server to change to after it acquires the port. If your port number is greater than 1024, you can leave this blank.

The MIME Types Section

The ns/mimetypes configuration file section allows you to have global settings for MIME types.

ns/mimetypes

This section is used to map file name extensions to the content-type headers returned to browsers. Each parameter specifies an extension and the type to return. Any extension and content-type pair specified here will either override the default setting (if the extension is the same as a default extension) or be added to the default settings (if the extension does not exist in the default settings).

Parameter

Default Value

Description

Default

The default MIME type to use if there is no explicit mapping specified for a file name extension.

NoExtension

The MIME type to use for files with no extension.

file-extension

type (default MIME types listed below)

A content-type to return in the header information for the specified file extension.

The default MIME type parameter definitions are:

    .ai application/postscript
    .aif audio/aiff
    .aiff audio/aiff
    .ani application/x-navi-animation
    .art image/x-art
    .au audio/basic
    .avi video/x-msvideo
    .bin application/x-macbinary
    .bmp image/bmp
    .dcr application/x-director
    .dir application/x-director
    .dp application/commonground
    .dxr application/x-director
    .elm text/plain
    .exe application/octet-stream
    .gbt text/plain
    .gif image/gif
    .gz application/x-compressed
    .hqx application/mac-binhex40
    .htm text/html
    .html text/html
    .jfif image/jpeg
    .jpe image/jpeg
    .jpg image/jpeg
    .jpeg image/jpeg
    .js application/x-javascript
    .ls application/x-javascript
    .map application/x-navimap
    .mocha application/x-javascript
    .mov video/quicktime
    .mpe video/mpeg
    .mpeg video/mpeg
    .mpg video/mpeg
    .nvd application/x-navidoc
    .nvm application/x-navimap
    .pbm image/x-portable-bitmap
    .pdf application/pdf
    .pgm image/x-portable-graymap
    .pic image/pict
    .pict image/pict
    .pnm image/x-portable-anymap
    .ps application/postscript
    .qt video/quicktime
    .ra audio/x-pn-realaudio
    .ram audio/x-pn-realaudio
    .ras image/x-cmu-raster
    .rgb image/x-rgb
    .rtf application/rtf
    .sit application/x-stuffit
    .snd audio/basic
    .stl application/x-navistyle
    .tar appliation/x-tar
    .text text/plain
    .tgz application/x-compressed
    .tif image/tiff
    .tiff image/tiff
    .txt text/plain
    .vrml x-world/x-vrml
    .wav audio/x-wav
    .wrl x-world/x-vrml
    .xbm image/x-xbitmap
    .xpm image/x-xpixmap
    .z application/x-compressed
    .zip application/x-compressed

The Servers Sections

ns/servers

This section lists (and names) each of the servers that are to be run within the AOLserver process.

Parameter

Possible Values

Description

server-name

"description text"

The name (user-defined) of a server, which must be all lowercase. The description text can be any user-defined comments.

ns/server/server-name

This section configures a server. There should be one of these sections for each server listed in the ns/servers section if you want to change any of the default settings for the parameters.

Parameter

Default Value

Description

ConnsPerThread

100

After the specified number of connections, a connection thread will exit. This parameter is useful for working around memory leaks in Tcl code.

DirectoryFile

index.htm, index.html

A comma-separated list of default files to get if the URL specifies only a directory. For example:

DirectoryFile "index.htm,index.html"

This server will try each of the filenames in the list, left to right.

EnableAOLpress

on

If set to on, "NaviServer/2.0 " is prepended to the Server: output header.

KeepAliveTimeout

30

Number of seconds after which to hang up on clients while waiting for an HTTP request in a connection: keep-alive situation.

MaxConnections

100

Maximum number of concurrent HTTP connections (should be equal to MaxThreads).

MaxThreads

50

The maximum number of threads this server can use within the AOLServer process. If more threads are requested than MaxThreads, the requests will be forced to wait until the number of waiting requests drops below MaxThreads.

MaxKeepAlive

100

Maximum number of connections which can use HTTP keep-alive; should be equal to MaxConnections,

MinThreads

0

The number of threads in the AOLserver process to initialize when this server is started.

PageRoot

/servers/server/pages

Directory where pages and graphics for this server are stored.

Realm

The realm in which to request authentication when returning a "401 Unauthorized" error.

SockTimeout

30

Number of seconds to wait for an HTTP request before closing the connection.

ThreadTimeout

120

Number of seconds for threads to live with no connection.

ns/server/server-name/adp

This section is used to configure AOLserver Dynamic Pages (ADPs).

Parameter

Default Value

Description

Cache

on

Boolean value. If set to on, ADP caching is enabled.

DebugInit

"ns_adp_debuginit"

The procedure to run when debugging begins.

DefaultParser

"adp"

The default parser to use for ADPs with a file extension that is not associated with a parser in the ns/server/server-name/adp/parsers section. For example:

    ns_section "ns/server/server1/adp"
    ns_param "map" "/*.adp"
    ns_param "map" "/*.inc"
    ns_param "map" "/*.fadp"
    ns_param "DefaultParser" "adp"

EnableExpire

off

Boolean value. If set to on, the "Expires: now" header is set on all outgoing ADPs.

EnableDebug

off

Boolean value. If set to on, appending "?debug" to a URL will enable TclPro debugging.

Map

The Map parameter specifies which pages the server will parse. You can specify a file extension (such as /*.adp) or a directory (such as /usr/pages/adp). If no directory is specified, the pages directory is assumed. The wildcards * ? and [] can be included in the Map specification. You can specify multiple Map settings.

The following example specifies that all files in the pages directory with the extensions .adp or .asp will be parsed, and all files in the /usr/pages/myadps directory will be parsed.

    Map "/*.adp"
    Map "/*.asp"
    Map "/foo/myadps"

StartPage

The file to be run on every connection instead of the requested ADP. It can be used to perform routine initialization. It would then usually include the requested ADP by calling:

ns_adp_include [ns_adp_argv 0]

TagLocks

off

Boolean value. If set to on, ADP tags may be registered after server startup. Pages will be served less quickly when this is turned on.

If set to off, ADP tags can only be registered before the first ADP is served.

ns/server/server-name/adp/parsers

This section is used to configure ADP parsers. For more information on ADP parsers, see page 10 of the AOLserver Tcl Developer's Guide.

Parameter

Valid Value

Description

parser-name

file-extension

An association between an ADP parser and a file extension. The specified parser will be used to parse all ADPs with the specified file extension.

Two pre-defined parsers, "adp" and "fancy", are already registered. You can register additional parsers with the Ns_AdpRegisterParser C API function. For example:

    ns_section "ns/server/server1/adp/parsers"
    ns_param "adp" ".adp"
    ns_param "fancy" ".fadp"

ns/server/server-name/db

This section specifies the database pools that will be accesible by a server. The available database pools are listed in the ns/db/pools section. There should be one of these sections for each server if you want to restrict a server's access to a subset of the available database pools.

Parameter

Default Value

Description

DefaultPool

The default pool for the ns_conn db and ns_db gethandle Tcl functions to access.

Pools

(no database pools are accessible by default)

A comma-delimited list of pool names specifying the pools that are to be accessible from this server, or "*" to signify that all pools should be accessible.

The available pools are listed in the ns/db/pools section.

ns/server/server-name/fastpath

This section configures fastpath for a specific server. There should be one of these sections for each server if you want to change any of the default settings for the parameters.

Parameter

Default Value

Description

DirectoryFile

index.htm, index.html

A comma-separated list of default files to get if the URL specifies only a directory. For example:

DirectoryFile "index.htm,index.html"

This server will try each of the filenames in the list, left to right.

MMap

off

If set to on, uses the potentially faster mmap method of sending files. Not all socket drivers implement this.

Cache

on

If set to on, enables file caching.

CacheMaxEntry

8192

Maximum size of a file to cache. Files larger than this won't be cached.

CacheMaxSize

5120000

Maximum size for file cache, per thread. The actual maximum memory usage will be this number times MaxThreads.

PageRoot

/servers/server/pages

Directory where pages and graphics for this server are stored.

ns/server/server-name/realms

This section configures realms for a specific server. There should be one of these sections for each server if you want to change any of the default settings for the parameters..

Parameter

Default Value

Description

realm-name

filename

Define a path and file name for the named realm. A realm lets you redirect logging from individual modules to different files, instead of having all messages go to the server log. For example:

    ns_section "ns/servers/server1/realms"
    ns_param realm1 "/usr/tmp/realm1.out"
    ns_param realm2 "/usr/tmp/realm2.out"

The following realms are already defined:

nsd.adp: ADP-related messages nsd.cache: Messages from the ADP and Fastpath cache nsd.db: Database messages nsd.dns: DNS lookup messages nsd.fastpath: Fastpath messages nsd.pidfile: Messages dealing with PID file nsd.return: Messages while sending data to a client nsd.sched: Messages from scheduled procs API nsd.socket: Messages occuring during socket communications (not HTTP) nsd.tcl: Tcl messagse nsd.geturl: Messages while fetching external web pages

The nsperm, nscgi, nscp, nslog, and nsvhr modules all register realms with the name they're given in the ns/servers/server-name/modules section of the configuration file.

ns/server/server-name/redirects

This section configures redirects for a specific server. There should be one of these sections for each server if you want to change any of the default settings for the parameters.

Parameter

Default Value

Description

status

url

When returning the specified status, send a redirect to the specified url. You can define multiple status and url pairs.

ns/server/server-name/tcl

This section configures Tcl for a specific server. There should be one of these sections for each server if you want to change any of the default settings for the parameters.

Parameter

Default Value

Description

AutoClose

on

If AutoClose is on, all non-shared files opened by an individual interpreter in the group will be closed when Ns_TclDeAllocateInterp is invoked. (Other interpreters in the group are not affected.) Ns_TclDeAllocateInterp is called after each Tcl request procedure.

It is recommended that you leave the AutoClose parameter set to on and share files between interpreters.

Debug

Off

Boolean value. If set to On, names of files sourced during startup are written to the server log.

Library

/servers/server1/modules/tcl

Directory for private Tcl script library for this server. Tcl scripts in this private library will override identically-named Tcl scripts in the shared Tcl library.

ns/server/server-name/modules

This section lists the AOLserver modules that are to be loaded into a server. There should be one of these sections for each server listed in the ns/servers section.

The name of the module can be any name you choose, but it must then be referenced as the module name in the appropriate ns/server/server-name/module/module-name section. For example, if you set mylog to nslog.so, you must configure the module in a section called ns/server/server-name/module/mylog instead of ns/server/server-name/module/nslog.

The file specified as the usual value for each parameter exists in the bin directory under the AOLserver home directory by default. If it resides somewhere else, include an absolute path specification along with the file.

Parameter

Usual Value

Description

nscgi

nscgi.so

If present, enables CGI support for this server. Configure CGI in the ns/server/server-name/module/nscgi section.

nscp

nscp.so

If present, enables the control port administration interface for the server.

nslog

nslog.so

If present, enables an access log for this server.Configure the access log in the ns/server/server-name/module/nslog section.

nsperm

nsperm.so

If present, enables access control capabilities for this server. Configure these capabilities in the ns/server/server-name/module/nsperm section.

nssock

nssock.so

If present, allows TCP/IP sockets connection for this server.Configure the sockets connection in the ns/server/server-name/module/nssock section.

nsvhr

nsvhr.so

If present, enables virtual host redirection, which allows you to proxy requests to different servers.

ns/server/server-name/module/nscgi

This section configures CGI for a server. There should be one of these sections for each server that includes the nscgi module if you want to change any of the default settings for the parameters.

Parameter

Default Value

Description

BufferSize

8192

The number of bytes to buffer before sending them out to the browser.

Debug

off

Boolean value. If set to On, extra debugging is enabled.

Environment

Specifies a section in the configuration file to be used as the default environment for CGI scripts run on this server. For example, if you set Environment to CGIenv, you must include a ns/environment/CGIenv section in the configuration file containing environment variable definitions. The environment variables will be in addition to the standard CGI variables.

GetHostByAddr

off

Boolean value. If set to Off (the default), REMOTE_HOST will be the same as REMOTE_ADDR, thereby improving performance by eliminating reverse lookup requests. If set to On, a reverse lookup request is used to supply the REMOTE_HOST value.

Interps

Specifies a section in the configuration file to define mappings between extensions of CGI script files and programs. For example, if you set Interp to CGIinterps, you must include a ns/interps/CGIinterps section in the configuration file containing appropriate mappings. See below for a description of the format of an Interps section.

Limit

0 (unlimited)

Maximum number of concurrent CGI processes.

Map

Method, URL, and directory where CGI programs reside. A trailing slash on the URL is not allowed. The directory must be an absolute pathname. A trailing slash on the directory is optional. If the directory is missing, the pages directory is assumed. Examples:

Map "GET /cgi /usr/local/cgi"

Map "POST /*.cgi"

You may have more than one Map entry. Typically, there are at least Map entries for the GET and POST methods.

MaxOutput

10240

Maximum number of bytes of output the CGI program can send.

SystemEnvironment

off

Boolean value. If set to on, sets the ??? environment variable.

ns/server/server-name/module/nscp

This section configures the control port, through which you can administer the server. There should be one of these sections for each server that includes the nscp module if you want to change any of the default settings for the parameters.

Parameter

Default Value

Description

Address

"127.0.0.1"

The address to bind to.

Binary

"bin/nscp"

The path for the control port executable.

InitCmds

Commands to be executed by the control port when it starts. For example, to automatically view the log when you log into the control port, set this parameter as follows:

    ns_param initcmds "tail -f 
log/server.log&"

Port

9999

The port to listen on. To access the administration interface, telnet to the specified Port at the specified Address. For example: telnet localhost 9999

Reconnection

Off

Boolean value. If set to On, telnet connections to the control port will not be disconnected when AOLserver exits for any reason, such as when an ns_shutdown command is issued. Instead, the control port will issue the following message if AOLserver exits:

    AOLserver has terminated. The control
port will automatically reconnect
to it when the nsd process 
is restarted. You may type ^C to 
close this control port connection.

When AOLserver is restarted in another window, this message is displayed:

    Reconnected successfully
    Welcome to the AOLserver control 
port!
    247 commands
    server1>

When this parameter is set to On, it is also possible to restart AOLserver from the control port by issuing a command such as:

    server1> !bin/nsd -kt nsd.tcl

Warning! Setting this parameter to On is a potential security hole. Use this parameter only on development systems and not on production systems. To ensure security, make sure the /servers/server1/module/nscp directory has permissions 700 and is owned by the same user that AOLserver runs as.

ns/server/server-name/module/nscp/users

This section the users allowed to access the control port for the server. There should be one of these sections for each server that includes the nscp module if you want to change any of the default settings for the parameters.

Parameter

Default Value

Description

Permuser

The username and inputrc file for the user allowed to set permissions using the control port. The format is:

"name:inputrc-file"

The password will be taken from the nsperm module.

User

The username, password and inputrc file for the user allowed to access the control port for this server. The format is:

"name:encrypted-password:inputrc-file"

For example:

"nsadmin:cU00q44rXCZew:modules/nscp/tcsh.inputrc"

This allows the nsadmin user to login with the given encrypted password, and the specified inputrc will be used.

For information on the inputrc format, read the documentation for GNU Readline 4.0. If nscp is built without the GNU Readline library (the default configuration), only the following functions are allowed in the inputrc file:

echo newline backward-delete-char beginning-of-line end-of-line forward-char backward-char up-history down-history complete-word delete-char kill-line yank clear-screen transpose-chars kill-whole-line set-mark kill-region copy-region-as-kill exchange-point-and-mark backward-word forward-word delete-word history-search-backward history-search-forward exit-if-empty

ns/server/server-name/module/nslog

This section configures the nslog module for a server. There should be one of these sections for each server that includes an nslog module if you want to change any of the default settings for the parameters.

Parameter

Default Value

Description

File

access.log

The name of the file where the access log is to be stored. If no directory is specified, the file will be created in the /servers/server-name/modules/nslog directory. If you specify only an absolute or relative directory and no filename, the file access.log will be created in that directory.

Accesses are logged in CERN Common Logfile Format.

FormattedTime

On

Boolean value. If set to On, nslog will use the common log format for the timestamp. When Off, the time will be logged as seconds since Jan 1 1970. That will provide a small speedup in heavily accessed sites because of locking that occurs in performing timzeone conversions.

LogCombined

off

Boolean value. If set to on, logs will be generated in the NCSA combined log format. The NCSA combined log format will include the referring URL and the user agent (so you can turn off LogRefer and LogUserAgent), and it will not surround them with double quotes.

MaxBackup

5

The maximum number of access logs that will be saved. This amount includes the current access log. For example, a value of 5 means the current access log plus 4 backup logs.

RollHour

0 (midnight)

The hour at which the access log will be rolled on the day or days specified by the RollDay parameter. The hour must be specifed as an integer from 0 to 23 representing the hour in military time.

RollLog

on

Boolean value. If set to On, the access log is rolled according to the settings for the RollDay and RollHour parameters. If set to Off, log entries will be written to the same access log indefinitely. However, the access log can still be rolled on SIGHUP if the RollOnSignal parameter is set to On (the default).

RollOnSignal

on

Boolean value. The default, "on", specifies that the access log will be rolled when a SIGHUP signal is sent to the process id of the running server. The process id can be found in the file specified by the PidFile parameter.

If set to "off", the access log will not be rolled when a signal is sent.

ns/server/server-name/module/nsperm

This section configures the nsperm module for a server. There should be one of these sections for each server that includes an nsperm module if you want to change any of the default settings for the parameters.

Parameter

Default Value

Description

SkipLocks

on

Boolean value. If set to on, permissions lookups will be faster, but no permissions settings may be added while the server is running.

ns/server/server-name/module/nssock

This section configures the nssock module for a server. Each server must have an nssock module loaded. There should be one of these sections for each server that includes an nssock module if you want to change any of the default settings for the parameters.

Parameter

Default Value

Description

Address

IP Address or hostname where this server listens for requests. If this parameter is not set, AOLserver will listen on all interfaces. This means that if one server does not set an address, no other server may use the same Port.

Hostname

AOLserver queries the DNS (Domain Name Service) for the host name.

Host name used in response to clients. This may be an alias for your site, such as www.avalon.com. Make sure the IP address of the Hostname you set is valid or users will be unable to process redirects from your site.

Location

The URL that redirects come back to. This parameter is useful when the server machine is part of a group of machines responding to requests through a DNS rotor. By default, the server will use http://hostname as the location.

Port

80

Port number where this server listens for requests. If two servers use the same port, they must use different Addresses.

ns/server/server-name/module/nsvhr

This section configures the nsvhr module for a server. There should be one of these sections for each server that includes an nsvhr module if you want to change any of the default settings for the parameters.

Parameter

Default Value

Description

BusyURL

An URL to redirect to if a proxy attempt times out.

ErrorURL

An URL to redirect to when an unknown host is requested or the host could not be reached.

Method

A method to proxy. Can be GET, POST, or HEAD. This parameter may be specified multiple times.

Timeout

30

The number of seconds to wait for a back-end host while proxying.

ns/server/server-name/module/nsvhr/maps

This section configures the nsvhr module for a server. There should be one of these sections for each server that includes an nsvhr module if you want to change any of the default settings for the parameters.

Parameter

Default Value

Description

hostname

url

If a request comes in with Host: hostname, the request will be proxied to the specified url. For example:

phony.hosting.com=http://127.0.0.0:2000/

phony2.hosting.com=unix://phony2

The phony2 domain is a UNIX domain socket file name defined in the ns/server/servername/module/nsunix section. The syntax for the UNIX domain socket file name follows the URL syntax of a host name. The unix:// prefix is required before the socket file name.

ns/server/server-name/module/nsunix

This section configures the nsunix module for a server. This section is needed if you want the nsvhr module to proxy over a UNIX domain socket instead of a TCP socket. Initially, this driver accepts a connection on a Unix domain socket and receives a message sent by nsvhr.so. The message contains the passed file descriptor of the connection socket and the initial data from that connection socket. The rest of the data is read from the passed file descriptor after the initial data has been consumed from the message. These are the required parameters:.

Parameter

Default Value

Description

Hostname

Host name used in response to clients. This may be an alias for your site, such as www.avalon.com. Make sure the IP address of the Hostname you set is valid or users will be unable to process redirects from your site.

Port

Port number where this server listens for requests.

SocketFile

The file name for the UNIX domain socket. It follows the same syntax of a host name named by the Hostname parameter. No slashes (/) are permitted in the file name, but the dot (.), dash (-), and underscore (_) characters are permitted. The socket file is created in the modules/nsunix/ directory. For example:

ns_param SocketFile "server2.nsunix"

There is a comprehensive sample nsd.tcl file in the nsvhr/ directory that shows how to configure the nsvhr module to proxy to a nsunix module of a different server. The two servers are started with these commands:

    bin/nsd -s server1 -f -t nsd.tcl
    bin/nsd -s server2 -f -t nsd.tcl

Database Drivers and Pools

ns/db/drivers

This section lists the available database drivers to be used with the database pools. The name of the driver can be any name you choose, but it must then be referenced as the driver name in the appropriate ns/db/driver/driver-name section. Note that the driver parameter in the ns/db/pool/pool-name section must also reference the driver name to associate a database driver with a particular database pool.

The file specified as the usual value for each parameter exists in the bin directory under the AOLserver home directory by default. If it resides somewhere else, include an absolute path specification along with the file.

Parameter

Usual Value

Description

postgres

nspostgres.so

If present, enables the Postgres database driver. No configuration is necessary for the Postgres driver.

solid

nssolid.so

If present, enables the SOLID database driver. No configuration is necessary for the SOLID driver.

extname

nsext.so

The external database driver name. There can be multiple (uniquely-named) instances of this parameter, one for each proxy daemon interface. By convention, the external driver names are prepended with "ext". For example: extIll or extSyb.

ns/db/driver/extname

This section configures an external database driver. There should be one of these sections in your configuration file if an external driver is listed in the ns/db/drivers section and you want to change any of the default settings for the parameters

Parameter

Usual Value

Description

LocalDaemon

Sybase: nssybpd

The local database proxy daemon.

Use this parameter only for local database proxy daemons.

MaxElement-Size

32K

An integer value specifying the maximum element size for an external database driver.

RemoteHost

A remote host name. Use this parameter only for remote database proxy daemons.

RemotePort

A remote port number. Use this parameter only for remote database proxy daemons.

Param

/usr/local/miadmin/MiParams

For Sybase, the value of the SYBASE environment variable.

TrimData

off

Boolean value. For Sybase. If set to On, the external driver will trim from the right the data returned by the Sybase server. This parameter is useful when, for example, you don't want all the empty whitespace from a 32-character char or when "empty" varchars are returning a non-empty 2-byte value.

Note that this will probably corrupt image types that are holding binary data in a BLOB (the "text" type in Sybase), so it is recommended that you leave this parameter Off if you're working with BLOBs.

ns/db/pools

This section lists (and names) each of the available database pools for AOLserver.

Parameter

Default Value

Description

pool-name

pool description

The name (user-defined) of a database pool, which is actually a collection of connections accessible to AOLserver to the associated database. The database connection itself is configured in the ns/db/pool/pool-name section.

The pool description can be any user-specified comments about the pool.

ns/db/pool/pool-name

This section configures a database pool. There should be one of these sections for each database pool listed in the ns/db/pools section.

Parameter

Default Value

Description

Connections

2

The maximum number of connections that can be established at any one time. The server automatically makes connections as needed up to this maximum number. If additional connections are requested during processing, the requests must wait.

Note: Some databases do not handle multiple connections very well. In this case, you should set Connections to 1 (one).

Datasource

Postgres: host:port:database

Solid: TCP/IP hostname port

The location and name of the database, according to the specifications of the database being used.

Driver

Value can be any driver named in the ns/db/drivers section: postgres (for Postgres), solid (for SOLID), or an external database driver.

LogSQLErrors

off

Boolean value. If set to On, SQL errors are written to the server log along with the offending SQL statement(s). If set to Off and Verbose is also Off, SQL errors are not written to the server log.

MaxIdle

600

The maximum length of time in seconds that a database connection within this pool can remain open and idle.

The default setting causes connections that are idle for 10 minutes to be closed. Note that MaxIdle will not have an effect if it is equal to MaxOpen.

Setting MaxIdle to 0 makes it impossible for database handles to become stale, unless the MaxOpen time expires.

MaxOpen

3600

The maximum length of time in seconds that a database connection within this pool can remain open. It is recommended that MaxOpen be a multiple of MaxIdle; otherwise, MaxOpen may be off by as much as (MaxOpen mod MaxIdle).

The default setting causes all connections to be closed after one hour, regardless of activity level. Database pool connections will then be opened again as needed up to the value of the Connections parameter.

Setting MaxOpen to 0 makes it impossible for database handles to become stale when they are not idle.

Password

Password to log into the database.

User

Username to log into the database.

Verbose

off

Boolean value. If set to On, all SQL statements executed against this pool are written to the server log. Errors, connects, and disconnects are also logged. If set to Off, SQL statements are not written to the server log.

At no point is the same SQL statement written to the log twice, even if Verbose is On, LogSQLErrors is On, and the statement causes an error.

Note: Setting Verbose may result in a large amount of output in the server log file.

CGI Interpreters and Environment

ns/interps/interps-name

This section allows you to configure an interps section that can be used by CGI modules loaded into any of the servers..

Parameter

Default Value

Description

file-extension

program(environment)

A CGI interpreter definition used by a CGI module. The environment is optional and specifies a section of environment variables to set in addition to the CGI variables before executing the interpreter program. For example:

    .pl "c:\perl\bin\perl.exe"
    .sh "c:\mks\mksnt\sh.exe(MKSenv"

In this case, Perl will be invoked to interpret CGI scripts which end in .pl; the variables in the ns/environment/mksenv section will be set before the MKS Bourne shell is invoked to interpret CGI scripts which end in .sh.

To enable this section to be used by a specific CGI module, use the Interps parameter of the CGI module.

ns/environment/environment-name

This section allows you to configure an environment section that can be used by CGI modules loaded into any of the servers..

Parameter

Default Value

Description

variable

definition

An environment variable definition used by a CGI module. To enable this section to be used by a specific CGI module, use the Environment parameter of the CGI module or add the optional environment name in the definition of a CGI interpreter.

SGI IRIX Sproc-Based Threads

ns/threads

This section allows you to configure sproc-based threads available on IRIX 5.3 or 6.2 (not the pthreads-based approach available on IRIX 6.2).

Note that these parameters are provided for advanced IRIX users who need to fine-tune their system..

Parameter

Default Value

Description

InitSize

262144

The SGI arena size in bytes (minimum is 32768).

InitUsers

100

Maximum number of users for the SGI arena (miminum is 10; maximum is 1500).

MaxTLS

200

Maximum number of thread-local storage variables.

PoolTrace

File specification where debugging output of memory pools should be written.

StackSize

65536

Starting stack size for each thread. This value overrides the StackSize parameter in the ns/parameters section.

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1998-99 America Online, Inc.