Sun WebServer Installation Guide

New Terminology/Structure

Sun WebServer 2.0 differs from Sun WebServer 1.0 in significant ways, so the Sun WebServer 1.0 configuration files must be converted into files compatible with Sun WebServer 2.0. This document is a guide to this conversion. Refer to the Sun WebServer 2.0 documentation for details on the new features of Sun WebServer 2.0.

While Sun WebServer 1.0 and Sun WebServer 2.0 can both be installed on the same machine, they cannot coexist in the same location. You must remove Sun WebServer 1.0 completely before installing Sun WebServer 2.0. Sun WebServer 1.0 can only coexist with Sun WebServer 2.0 if Sun WebServer 1.0 is installed to a non-default directory (a directory other than "/"). Refer to the Sun WebServer 1.0 Installation Guide for instructions on installing Sun WebServer 1.0 to a non-default directory. The examples in this document refer to Sun WebServer 1.0 configuration files using their default installation location (/etc/http/ for both httpd.conf and access.acl). After removing the Sun WebServer 1.0 packages (which must be done before installation of Sun WebServer 2.0), the configuration files are moved to a backup directory /etc/http.bak[.n]/ (for example, /etc/http.bak/, /etc/http.bak.1/, /etc/http.bak.2/, ...). The configuration files for the most recent uninstall will be located in the directory with the highest value for `n'.

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.0 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.0 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.0 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.0 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.0 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 Administration Console 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.0 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.0. Please refer to the Sun WebServer 2.0 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.0 also has an Administration Console, located in the package SUNWhtadm, that can be used to administer all aspects of the HTTP server. To access the Administration Console, you must also install SUNWixklg and SUNWixavm.