HP Enterprise Cluster Master Toolkit User Guide (5900-2131, December 2011)

Configuring the Apache Web Server with Serviceguard
To manage an Apache Web Server by Serviceguard, the default Apache configuration needs to
be modified. Before creating and configuring Serviceguard packages, make sure that the following
configurations have been completed for the Apache Web Server application for all cluster nodes:
When the Apache Server is installed, the default instance may be automatically configured to be
started during system startup via the runlevel (rc) script "hpws22_apacheconf" in the
/etc/rc.config.d/ directory by setting "HPWS22_APACHE_START=1". You should make sure this
is disabled by setting "HPWS22_APACHE_START=0".
The httpd.conf file associated with the default Apache instance has a Listen directive "Listen
80", which is equivalent to listening for all IP addresses at port 80. If an Apache instance needs
to be configured so that it listens to specific IP Addresses, this has to be changed to "Listen <IP
Address> <Port>”.
NOTE: The default configuration file is available at: /opt/hpws22/apache/conf/httpd.conf
You should disable the automatic start of the standard Apache default installation if Apache is run
from Serviceguard so that nothing is running on the server at the system startup time.
You must create a separate, distinct SERVER_ROOT directory for each Apache Serviceguard
package.
You must configure all Apache instances to listen to package re-locatable IP addresses using
BindAddress or Listen directives. (Refer to the Apache Web Server documentation for detailed
information on configuring virtual hosts.) For example, the configuration file for an Apache instance
that combines IP-based and name-based virtual hosts would include following directive:
Listen 192.168.0.1:80
Listen 192.168.0.2:80
NameVirtualHost 192.168.0.2:80
<VirtualHost web.site1.url:80>
ServerName web.site1.url
DocumentRoot /shared/httpd/www-site1
</VirtualHost>
<VirtualHost web.site2.url:80>
ServerName web.site2.url
DocumentRoot /shared/httpd/www-site2
</VirtualHost>
Local Configuration
For a local configuration, install and configure Apache in the same location on the primary and
all backup nodes and set up identical (or equivalent) configuration files in the same server root
directory on all nodes. Also, all document root directories must exist on all nodes and should
contain identical files.
For a shared configuration, typically configure document root directory on shared file system. Note
that one or more shared file systems may be used. Ensure that all required components which are
on shared storage will be available at the same time. (It is not mandatory to place the SERVER_ROOT
directory on a shared file system in order to make use of shared storage. Choose a local
SERVER_ROOT directory for configuration files and place only the document root directories on a
shared file system. However, configure identical SERVER_ROOT directories and identical
configuration files on all nodes.)
100 Using an Apache Toolkit in a HP Serviceguard Cluster