NOTE: In an HP-UX 11.x environment, the Apache server is usually installed in the location /opt/hpws22/apache and the configuration file httpd.conf resides in the "conf" sub-directory under the "SERVER ROOT" directory.

Apache Package Configuration Overview

Apache starts up by reading the httpd.conf file from the "conf" sub-directory of the

SERVER_ROOT directory which is configured in the toolkit user configuration file hahttp.conf. Configuration rules include the following:

Each node must have the same version of the HP-UX based Apache Web Server.

Each node must have the same SERVER_ROOT directory where identical copies of the configuration file for each instance are placed.

Each node must have the same document root directory where identical copies of the web document for each instance are placed.

Apache Web Server can be configured in two different ways:

(local config) by putting the configuration and other web-site files on a single node, then replicating the files to all other nodes in the cluster

(shared config) with document root files (and optionally, configuration file) in a shared file system

Local Configuration

In a typical local configuration, nothing is shared between the nodes. Identical copies of the Apache server configuration file and web documents reside in exactly the same locations on each node. The user is responsible for maintaining identical copies of the apache components on the different nodes. This is useful when the information on the web-page is static.

If the user chooses to do this, it is the user's responsibility to ensure the data is propagated to all nodes, and is consistently maintained. A disadvantage of storing the configuration on local disks is that this can increase the chance of the configuration for an Apache instance becoming inconsistent if changes are made, but not distributed to all nodes that can run that Apache instance.

Shared Configuration

In a typical shared configuration, the document root directories are all on the shared file system. (Placing the SERVER_ROOT directory in the shared file system is optional.) Since the web documents (along with the apache configuration file) are on shared storage - accessible to all nodes in the cluster - there is no need to maintain local identical copies of the files on each node. The mount point of the shared file system should be identical across all the Apache package nodes. Hence this is the recommended Apache package configuration.

Each web site is assigned IP addresses (or domain addresses that maps to particular IP addresses) through the configuration file. These relocatable IP addresses are created for each Apache package and added to its Package Control Script in case of legacy packages or the Package ASCII file in case of modular packages. When the Apache package is switched over from one node to another, this particular instance is stopped and IP addresses are removed on the primary node, then the IP addresses are reallocated and the instance is started on the adoptive node. Clients will then be automatically connected through these IP addresses to the web site on the adoptive node.

Multiple Apache Instances Configuration

Apache Web Server is a multi-instance application, which means more than one instance of the Apache Web Server can run on a single node at the same time. For example, if two nodes are each running an instance of Apache and one node fails, the Apache instance on the failed node can be successfully failed over to the healthy node. In addition, the healthy node can continue to

Apache Package Configuration Overview 99