The configuration and behavior of Sun JavaTM System Web Server is determined by a set of configuration files. When you use the Administration interface, you change the settings in these configuration files. You can also manually edit these files.
This chapter has the following sections:
The configuration and operation of the Sun Java System Web Server is controlled by configuration files. The configuration files reside in the directory instance_dir/config. This directory contains various configuration files for controlling different components. The exact number and names of configuration files depends on which components have been enabled or loaded into the server.
However, this directory always contains four configuration files that are essential for the server to operate. These files are:
server.xml -- contains most of the server configuration.
magnus.conf -- contains global server initialization information.
obj.conf -- contains instructions for handling HTTP requests from clients.
mime.types -- contains information for determining the content type of requested resources.
server.xmlfile contains most of the server configuration. A schema file, sun-web-server_6_1.dtd, defines its format and content.
For more information about how the server uses sun-web-server_6_1.dtd and server.xml, see Chapter 2, Server Configuration Elements in server.xml.
This file sets values of variables that configure the server during initialization. The server executes the settings in this file on startup. The server does not check at this file again until it is restarted.
See Chapter 3, Syntax and Use of magnus.conf for a list of all the variables and Init directives that can be set in magnus.conf.
This file contains instructions for the Sun Java System Web Server about how to handle HTTP requests from clients and service web server content such as native server plug-ins and CGI programs. The server checks the configuration defined by this file every time it processes a request from a client.
This file contains a series of instructions (directives) that tell the Sun Java System Web Server what to do at each stage in the request-response process.You can modify and extend the request handling process by adding or changing the instructions in obj.conf.
All obj.conf files are located in the server_root/config directory. There is one obj.conf file for each virtual server class. Whenever this guide refers to "the obj.conf file," it refers to all obj.conf files or to the obj.conf file for the virtual server class described.
By default, each active obj.conf file is named vs_class-obj.conf. Editing one of these files directly or through the Administration interface changes the configuration of a virtual server class.
The obj.conf file is essential to the operation of the Sun Java System Web Server. When you make changes to the server through the Administration interface, the system automatically updates obj.conf.
For information about how the server uses obj.conf, see Chapter 4, Predefined SAFs in obj.conf.
This file maps file extensions to MIME types to enable the server to determine the content type of a requested resource. For example, requests for resources with .html extensions indicate that the client is requesting an HTML file, requests for resources with .gif extensions indicate that the client is requesting an image file in GIF format.
For more information about how the server uses mime.types, see "MIME Types."
For information about other important configuration files, see Chapter 6, Other Server Configuration Files.
The following section describes the directory structure created when you first install Sun Java System Web Server 6.1. The information is organized in two parts:
For all platforms, the following directories are created under the server root directory:
alias contains the key and certificate files for all Sun Java System servers (for example, https-admserv-server_id-cert8.db and secmod.db).
bin contains the binary files for the server, such as the actual server, the Administration Server forms, and so on. In addition, this directory includes the https/install folder that contains files needed for migrating server settings and default configuration files needed for backward compatibility.
docs is the server’s default primary document directory, where your server’s content files are usually kept. If you are migrating settings from an existing server, this directory doesn’t appear until you finish the migration process.
extras contains the log analyzer and log analysis tools.
The flexanlg directory contains a command-line log analyzer. This log analyzer analyzes files in flexlog format.
The log_anly directory contains the log analysis tool that runs through the Server Manager. This log analyzer analyzes files in common log format only.
httpacl contains the files that store access control configuration information in the generated.server-id.acl and genwork.server-id.acl files. The file generated.server-id.acl contains changes you make using the Server Manager access control forms after saving your changes; genwork.server-id.acl contains your changes before you save your changes.
https-admserv contains the directories for the Administration Server. This directory has the following subdirectories and files:
For UNIX/Linux platforms, this directory contains shell scripts to start, stop, and restart the server and a script to rotate log files.
ClassCache contains classes and Java files, generated as a result of the compilation of JavaServer pages.
conf_bk contains backup copies of the administration server’s configuration files.
SessionData contains session database data from MMapSessionManager.
startsvr.bat is the script that starts the Server Manager on Windows machines. The Server Manager lets you configure all servers installed in the server root directory.
stopsvr.bat is the script that stops the Server Manager on Windows machines.
https-server_id are the directories for each server you have installed on the machine. Each server directory has the following subdirectories and files:
ClassCache contains classes and Java files, generated as result of the compilation of JavaServer pages.
conf_bk contains backup copies of the server’s configuration files.
reconfig is the script used to reconfigure the server dynamically. If you make non-global changes to the server, you can use this script to reconfigure the server without stopping and starting it. Note that changes to ACL files and magnus.conf require you to stop and restart the server.
restart is the script that restarts the server.
rotate rotates server log files without affecting users who may be connected to the server.
search contains the following directories: admin and collections
SessionData contains session database data from MMapSessionManager.
startsvr.bat is the script that starts the Server Manager. The Server Manager lets you configure all servers installed in the server root directory.
plug-ins contains directories for Java, search, and other plug-ins. This directory has the following subdirectories:
htaccess contains server plug-in for .htaccess access control and htconvert, an .nsconfig to .htaccess converter.
digest contains the Digest Authentication Plug-in for Sun Java System Directory Server 5.0, as well as information about the plug-in.
samples contains samples and example components, plug-ins and technologies supported by the Sun Java System Web Server servlet engine. This includes binaries, all code, and a build enviroment.
servlets contains information about and examples of web-apps applications.
nsacl contains information for your server’s access control lists.
loadbal contains the required files for the Resonate load-balancer integration plug-in.
nsapi contains header files and example code for creating your own functions using NSAPI. For more information, see the Sun Java System documentation web site at:
search contains information for your server’s search plug-ins.
setup contains the various Sun Java System Web Server setup files, including setup.log and uninstall.inf.
README.txt is the readme file that contains a link to the Sun Java System Web Server Release Notes.
In addition to the files and directories described in All Platforms the following files are created at the server-root directory for UNIX and Linux platforms:
startconsole launches a browser to the Administration Server page.
The following files are created under the server-root/https-admserv directory for UNIX and Linux platforms:
ClassCache contains classes and Java files, generated as result of the compilation of JavaServer pages.
conf_bk contains backup copies of the server’s configuration files.
config contains the Administration Server configuration files.
SessionData contains session database data from MMapSessionManager.
start is the script that starts the Server Manager. The Server Manager lets you configure all servers installed in the server root directory.
Dynamic reconfiguration enables you to make configuration changes to a live web server without having to stop and restart the web server for the changes to take effect. You can dynamically change all configuration settings and attributes in the server.xml file and its associated files without restarting the server.
To access the dynamic reconfiguration screen and install a new configuration dynamically, click the Apply link in the upper right corner of the Server Manager, Class Manager, and Virtual Server Manager pages, click the Load Configuration Files button on the Apply Changes page. If there are errors in installing the new configuration, the previous configuration is restored.