Table of Contents | Previous | Next | Index | Bookshelf

Programmer's Guide


Chapter 2. Configuration Files

This chapter gives an overview of the iPlanet Web Server's three main configuration files. The sections are:

For more detailed information about the files magnus.conf, obj.conf, and mime.types, see the NSAPI Programmer's Guide for iPlanet Web Server.

You can configure the iPlanet Web Server using the Server Manager interface, or by editing configuration files. The configuration files live in the config directory in the https-server_id directory in the installation directory. For example, if iPlanet Web Server is installed on a Windows NT machine in D:\Netscape\server4\, the configuration files for the server boots.mcom.com are in:

D:\Netscape\server4\https-boots.mcom.com\config
Briefly, the configuration files are:

The rest of this section discusses the three main configuration files.

magnus.conf

The file magnus.conf defines settings that the server uses for initialization. After the server starts up, it does not look in magnus.conf again. This file contains directives that each consist of a variable name and the setting for that variable.

An example of magnus.conf is:

#ServerRoot D:/Netscape/Server4/https-boots.mcom.com
ServerID https-boots.mcom.com
ServerName boots.mcom.com
Port 80
ExtraPath D:/Netscape/Server4/bin/https/jdk/jre/bin; D:/Netscape/Server4/bin/https/jdk/jre/bin/classic;D:/Netscape/Server4/wai/bin
LoadObjects obj.conf
RootObject default
ErrorLog D:/Netscape/Server4/https-boots.mcom.com/logs/errors
MtaHost name-of-mail-server
DNS off
Security off
Ciphers +rc4,+rc4export,+rc2,+rc2export,+des,+desede3
SSL3Ciphers +rsa_rc4_128_md5,+rsa_3des_sha,+rsa_des_sha, +rsa_rc4_40_md5,+rsa_rc2_40_md5,-rsa_null_md5
ACLFile D:/Netscape/Server4/httpacl/generated.https-boots.mcom.com.acl
ClientLanguage en
AdminLanguage en
DefaultLanguage en
AcceptLanguage off
RqThrottle 512
For a complete list of the directives in magnus.conf, see the magnus.conf appendix in the NSAPI Programmer's Guide for iPlanet Web Server.

obj.conf

The obj.conf file contains additional initialization instructions as well as instructions for the server about how to process requests from clients.

The normal procedure for modifying the iPlanet Web Server is to use the Server Manager interface. When you use the Server Manager interface to make changes to the iPlanet Web Server, the system automatically updates the obj.conf file.

You can also manually edit obj.conf if desired to add, remove, or modify directives. But if you do so, be sure to load obj.conf into the Server Manager before using the Server Manager to make further changes, otherwise Server Manager overwrites your manual changes.

Each instruction, or directive, in obj.conf, applies during initialization or during a particular stage of the request handling process. The stages are:

  1. Init -- instructions for initialization. These are performed after the server has set the variables defined in magnus.conf.
  2. AuthTrans -- authorization translation.
  3. NameTrans -- translates the logical URI into a local file system path.
  4. PathCheck -- checks the local file system for validity and access permissions.
  5. ObjectType -- determines the MIME type of the requested resource.
  6. Service -- generates the response and returns it to the client.
  7. AddLog -- adds entries to the log file if appropriate.
  8. Error -- updates the error log if an error occurred.
Each directive in obj.conf invokes a server application function (SAF) and passes arguments to it. For example, the following directive is invoked during the Service stage if the request method is GET and the requested content is of the type text/html. This directive sets the value of the trailer argument to "<H4><FONT COLOR=green>Served by 4.0</FONT></H4>" and passes it to the append-trailer SAF.

Service fn=append-trailer method=GET type="text/html" trailer="<H4><FONT COLOR=green>Served by 4.1</FONT></H4>" 
For more details about obj.conf, about the different stages in the request handling process, and for a list of the pre-defined SAFs you can use in directives, see the NSAPI Programmer's Guide for iPlanet Web Server.

mime.types

When a client, such as a browser, sends a request to the iPlanet Web Server, the MIME type determines the kind of content being requested. The MIME type is usually indicated by the extension of the requested resource. For example, .gif implies the client wants a GIF image, and .html implies the client wants an HTML file.

MIME stands for Multipurpose Internet Mail Extension (or Encoding).

The file mime.types maps extensions to MIME types. When the iPlanet Web Server starts up, it loads mime.types and uses it to create a table of mappings between MIME types and extensions.

The ObjectType directives in the file obj.conf give the server instructions on how to determine the MIME type. The catch-all ObjectType directive is:

ObjectType fn="type-by-extension"
The type-by-extension function looks up the MIME type according to the requested resource's extension.

The ObjectType directives set the type parameter. This parameter helps the server determine which Service directive to use to generate the response to send back to the client.

For example, if the request is http://boots/docs/servlet/jos.jsp, this is how the server decides which Service directive to use:

The server also puts the MIME type in the header information to return to the client so that the client knows what kind of content to receive.

An example of mime.types is:

type=text/html                 exts=htm,html
type=text/plain                exts=txt
type=text/richtext             exts=rtx
type=text/tab-separated-values exts=ts
type=text/x-setext             exts=etx
type=text/x-speech             exts=talk

type=video/isivideo            exts=fvi
type=video/mpeg                exts=mpeg,mpg,mpe,mpv,vbs,mpegv
type=video/x-mpeg2             exts=mpv2,mp2v
type=video/msvideo             exts=avi
type=video/quicktime           exts=qt,mov,moov
type=video/vivo                exts=viv,vivo
type=video/wavelet             exts=wv

#type=video/x-msvideo          exts=avi
type=video/x-sgi-movie         exts=movie
type=x-world/x-svr             exts=svr
type=x-world/x-vrml            exts=wrl
type=x-world/x-vrt             exts=vrt
type=x-conference/x-cooltalk   exts=ice

enc=x-gzip                     exts=gz
enc=x-compress                 exts=z
enc=x-uuencode                 exts=uu,uue

type=magnus-internal/imagemap          exts=map
type=magnus-internal/parsed-html       exts=shtml
type=magnus-internal/cgi               exts=cgi,exe,bat

type=magnus-internal/jsp               exts=jsp
type=application/x-x509-ca-cert        exts=cacert
type=application/x-x509-server-cert    exts=scert
type=application/x-x509-user-cert      exts=ucert
type=application/x-x509-email-cert     exts=ecert
For more details about the MIME types file and how the server uses it, see the MIME types appendix in the NSAPI Programmer's Guide for iPlanet Web Server.


Table of Contents | Previous | Next | Index | Bookshelf

Last Updated: 03/01/00 09:14:04

© Copyright © 2000 Sun Microsystems, Inc. Some preexisting portions Copyright © 2000 Netscape Communications Corp. All rights reserved.