Previous     Contents     Index     Next     
iPlanet Web Server, FastTrack Edition 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:

  • magnus.conf

    Defines global settings for the server, such as the server name. When the server is initialized, it executes the directives in magnus.conf.

  • obj.conf

    Provides instructions to the server about how to handle requests from clients such as browser. Whenever you make changes to the server through the Server Manager interface, the system automatically edits the obj.conf file. You can also manually edit obj.conf to modify the server behavior.

  • mime.types

    Defines the MIME types supported by the server. When the server starts up, it loads this file and creates a table that maps file extensions to MIME types, as defined in the file. For example, the extension .html is always mapped to the content type text/HTML.

  • Other configuration files.

    Depending on which features are enabled in the server, the config directory contains other configuration files, such as:

    servlets.properties -- defines the servlet properties.

    rules.properties -- defines virtual paths for servlets.

    contexts.properties -- defines the context properties.

    jvm12.conf -- defines Java settings, such as classpaths.

    acl.conf -- defines access control lists.

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/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:

  • obj.conf contains the directive:

    ObjectType fn="type-by-extension"

    This tells the server to look up the type in its MIME types table, which is based on the file mime.types.

  • In the MIME types table (which is based on mime.types), the server finds:

    type=magnus-internal/jsp exts=jsp

    This tells the server that the type is magnus-internal/jsp because the extension is jsp.

  • obj.conf also contains the directive:

    Service fn="NSServletService" type="magnus-internal/jsp"

    This tells the server to use the function NSServletService to generate the response.

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.


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

Last Updated July 13, 2000