Installation guide
Section 7.1:Setting Up an Apache Service 123
7 Apache Services
This chapter contains instructions for configuring Red Hat Linux Advanced Server to make the Apache
Web server highly available.
7.1 Setting Up an Apache Service
This section provides an example of setting up a cluster service that will fail over an Apache Web
server. Although the actual variables used in the service depend on the specific configuration, the
example may assist in setting up a service for a particular environment.
To set up an Apache service, you must configure both cluster systems as Apache servers. The clus-
ter software ensures that only one cluster system runs the Apache software at one time. The Apache
configuration will consist of installing the apache RPM packages on both cluster members and con-
figuring a shared filesystem to house the web site’s content.
When installing the Apache software on the cluster systems, do not configure the cluster systems
so that Apache automatically starts when the system boots by performing the following command:
chkconfig --del httpd. Rather than having the system startup scripts spawn httpd, the cluster
infrastructure will do that on the active cluster server for the Apache service. This will ensure that the
corresponding IP address and filesystem mounts are active on only one cluster member at a time.
When adding an Apache service, a "floating" IP address must be assigned to it. The cluster infra-
structure binds this IP address to the network interface on the cluster system that is currently running
the Apache service. This IP address ensures that the cluster system running the Apache software is
transparent to the HTTP clients accessing the Apache server.
The file systems that contain the Web content must not be automatically mounted on shared disk stor-
age when the cluster systems boot. Instead, the cluster software must mount and unmount the file
systems as the Apache service is started and stopped on the cluster systems. This prevents both cluster
systems from accessing the same data simultaneously, which may result in data corruption. Therefore,
do not include the file systems in the /etc/fstab file.
Setting up an Apache service involves the following four steps:
1. Set up the shared file system for the service. This filesystem is used to house the website’s content.
2. Install the Apache software on both cluster systems.
3. Configure the Apache software on both cluster systems.
4. Add the service to the cluster database.
To set up the shared file systems for the Apache service, perform the following tasks as root user on
one cluster system: