Sun Java System Web Server 7.0 Update 6 Administrator's Configuration File Reference

Chapter 4 Syntax and Use of magnus.conf

The magnus.conf file contains NSAPI plug-in initialization directives and settings that control the way NSAPI plug-ins are run. The magnus.conf file is located in the instance_dir/config directory.


Note –

When you edit the magnus.conf file, you must restart the server for the changes to take effect.


This chapter lists the settings that can be specified in magnus.conf.

Editing magnus.conf

You can add directives or edit existing directives in magnus.conf. Be very careful when editing this file. Simple mistakes can make the server fail to operate correctly. When editing magnus.conf, use the wadm command get-config-file to pull a copy of the file, edit the file locally, then use set-config-file to put the edited file back. You must restart the server after editing magnus.conf.

Directives in magnus.conf either set a value or invoke a Server Application Function (SAF).

Parameters

For pre-defined SAFs, the number and names of parameters depend on the function. The order of parameters on the line is not important.

Case Sensitivity

Items in the magnus.conf file are case-sensitive including function names, parameter names, parameter values, and path names.

Separators

The C language allows function names to be composed only of letters, digits, and underscores. You may use the hyphen (-) character in the configuration file in place of underscore (_) for your C code function names. This is only true for function names.

Quotation Marks

Quotation marks (") are only required around the value strings when there is a space in the string. Otherwise, they are optional. Each open quotation mark must be matched by a closed quotation mark.

Spaces

Line Continuation

A long line may be continued on the next line by beginning the next line with a space or tab.

Path Names

Always use forward slashes (/) rather than backslashes (\) in path names on the Windows platform. A backslash escapes the next character.

Comments

Comments begin with a pound (#) sign. If you manually add comments to obj.conf, then use the Admin Console or CLI to make changes to your server, your comments are overwritten when obj.conf is updated.

ChildRestartCallback

The ChildRestartCallback directive determines whether the Web Server calls the NSAPI functions that were registered using the daemon_atrestart function.

If you set ChildRestartCallback to on, the server calls the registered NSAPI functions when it shuts down or restarts. If you set ChildRestartCallback to off, the server never calls the registered NSAPI functions. If you do not explicitly set a value for ChildRestartCallback, the server calls the registered NSAPI functions when it shuts down or restarts only if all NSAPI Server Application Functions (SAFs) complete request processing before the TerminateTimeout timeout elapses.

Syntax

ChildRestartCallback value

where value is on or off.

Init Directives

The Init directives load and initialize server modules and NSAPI plug-ins.

Syntax

Init fn="function" param1="value1" ...paramN="valueN"

In this syntax:

KernelThreads

(Windows only) On Windows, the Web Server supports both kernel-level and user-level threads. User threads are scheduled by Netscape Portable Runtime (NSPR) within the process, whereas kernel threads are scheduled by the host's operating system. Usually, the standard debugger and compiler are intended for use with kernel-level threads.

If you set KernelThreads to 1 (on), the server uses the kernel-level threads. If you set KernelThreads to 0 (off), the server uses the user-level threads, which might improve performance.

Syntax

KernelThreads value

where value is 0 or 1.

Default

0 (off)

NativePoolMaxThreads

(Windows only) The NativePoolMaxThreads directive determines the maximum number of threads in the native (kernel) thread pool.

Default

0

NativePoolMinThreads

(Windows only) The NativePoolMinThreads directive determines the minimum number of threads in the native (kernel) thread pool.

Default

1

NativePoolQueueSize

(Windows only) The NativePoolQueueSize directive determines the number of threads that can wait in a queue for the thread pool. If all threads in the pool are busy, the next request-handling thread that needs to use a thread in the native pool must wait in a queue.

If a queue is full, the next request-handling thread that tries to get in the queue is rejected and the server returns a busy response to the client. The server is then free to handle another incoming request.

Default

0

NativePoolStackSize

(Windows only) The NativePoolStackSize directive determines the stack size of each thread in the native (kernel) thread pool.

Default

0

TerminateTimeout

The TerminateTimeout directive specifies the time (in seconds) that the server waits for NSAPI SAFs to complete the processing of any active requests before it shuts down. Increase the TerminateTimeout value to allow in-progress HTTP transactions to complete gracefully, or shorten the value to allow the server to shut down more quickly.

Syntax

TerminateTimeout value

where value is an interval in seconds.

Default

30

Umask

(UNIX only) The Umask directive specifies the maximum file permissions granted by NSAPI functions that create files and directories.

Syntax

Umask permissions

where permissions is a UNIX file permissions value in octal notation.

Default

0777