Sun WebServer 2.1 Installation Guide

New Terminology/Structure

If you have installed Sun WebServer 2.0, you can upgrade to Sun WebServer 2.1 by uninstalling the reinstalling the software. If you have Sun WebServer 1.0, the Sun WebServer 1.0 configuration files must be converted into files compatible with Sun WebServer 2.1. This document is a guide to this conversion. Refer to the Sun WebServer 2.1 documentation for details on the new features of Sun WebServer 2.1.

Instances and Web Sites

Even though Sun WebServer 1.0 was able to support multiple instances of the HTTP server running concurrently, starting, stopping, and restarting the server worked best with a single instance of the HTTP daemon. Sun WebServer 2.1 improves support for multiple instances by providing each httpd daemon on the system with a unique name. One is able to start, stop, and restart individual instances by using their names. See the man page htserver(1m) for more information.

Sun WebServer 2.1 has also expanded support of virtual hosts. Each virtual host is now associated with a web site and given its own subtree in the file system, which contains the configuration files for that host as well as the host's document root. While Sun WebServer 1.0 maintained all configuration information for a virtual host in the global configuration file httpd.conf, Sun WebServer 2.1 stores most of this information in a site configuration file located relative to the root of the web site. Placing most of the site-specific configuration information at the web site rather than in a single file makes Sun WebServer 2.1 more scalable than Sun WebServer 1.0 and simplifies the administration of individual web sites.

Configuration File Locations

Sun WebServer 1.0 had two primary configuration files in the default location /etc/http/:

Sun WebServer 2.1 partitions the directives in these files into server-level configuration files for server instances and site-level configuration files for individual web sites.

Server-Level Configuration Files

Server-level configuration files are installed in /etc/http/ by default. <instance_name> below is the unique name of the httpd instance using the file. An instance name is associated with a server instance when it is created using the Sun WebServer GUI or the htserver add command.

Site-Level Configuration Files

Site-level configuration files are installed to the web site subtree by default. <site_name> below refers to the name of the web site using this file.

All of the file names listed above are suggested names. The only fixed configuration file name is /etc/http/httpd-instances.conf. Each server instance name and basic configuration file is listed in httpd-instances.conf, and each server configuration file in turn refers to the other configuration files by name.

Command-Line Utilities

Sun WebServer 2.1 has added numerous command line utilities for modification of its configuration files. These utilities are used at various locations in this document to explain migration to Sun WebServer 2.1. Please refer to the Sun WebServer 2.1 man pages for details on all Sun WebServer utilities available from the command line. For the commands referenced in this document, refer to the htserver(1m), hthost(1m), and htrealm(1m) man pages. For information on the referenced configuration files see httpd.conf(4), httpd.site.conf(4), access.conf(4), and realms.conf(4). Sun WebServer 2.1 also has an GUI, located in the package SUNWhtadm, that can be used to administer all aspects of the HTTP server. To access the GUI, you must also install SUNWixklg and SUNWixavm.