Oracle iPlanet Web Server 7.0.9 Administrator's Configuration File Reference

Overview of server.xml

The server.xml file contains most of the configuration information needed to run the server. The server.xml file is located in the instance-dir/config directory. The encoding is UTF-8 to maintain compatibility with regular UNIX text editors.

sun-web-server_7_0.xsd

The sun-web-server_7_0.xsd schema validates the format and content of the server.xml file. The schema enforces type checks. For example, it ensures that the ip element specifies a valid IP address. The sun-web-server_7_0.xsd file is located in the install-dir/lib/dtds directory.

Editing server.xml

The structure of server.xml is a hierarchy, with server as the topmost element. The server element has many subelements, many of which have subelements of their own.

In general, you do not need to edit server.xml directly. Instead, use the Admin Console and the wadm command-line interface to change values in server.xml. Using wadm when creating scripts to change server.xml assures you of forward compatibility. If you do edit server.xml directly, exercise caution to make sure that the resulting server.xml file is valid.

Editing Element Values

To change the values in server.xml, change the value between the tags associated with the element you are editing. For example, to change the log level from info to fine, find the log child element of the server element. In this example, you see the following lines:

  <log>
    <log-file>../logs/errors</log-file>
    <log-level>info</log-level>
  </log>

To change the log level from info to fine, change the line:

<log-level>info</log-level>

to:

<log-level>fine</log-level>

After you make changes to the server.xml file, you must deploy your configuration for most changes to take effect. Use the command-line interface command wadm pull-config to pull the modified server.xml file, then use the Admin Console or the wadm deploy-config command to deploy your changes. For some changes, you must restart the server before they take effect. For information on which changes require a restart and which do not, see Dynamic Reconfiguration.

Adding Elements

To add a new element to sever.xml, add the element and any required subelements. Elements begin with a tag, for example <virtual-server>, and end with the closing tag, for example </virtual-server>. The tags are case-sensitive.

Validating server.xml

After editing server.xml, Web Server automatically validates the XML when you start or dynamically reconfigure a the server.

You can also use the –cofigtest option of the startserv script to validate your configuration. From the instance's bin directory, run:

startserv –configtest