Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
A.3. Installing and Configuring the Apache HTTP Server
The Apache HTTP Server must be installed and configured on all nodes in the assigned failover domain, if used, or in the cluster. The basic server configuration must be the same on all nodes on which it runs for the service to fail over correctly. The following example shows a basic Apache HTTP Server installation that includes no third-party modules or performance tuning.
On all node in the cluster (or nodes in the failover domain, if used), install the
httpd RPM package. For example:
rpm -Uvh httpd-<version>.<arch>.rpm
To configure the Apache HTTP Server as a cluster service, perform the following tasks:
- Edit the
/etc/httpd/conf/httpd.confconfiguration file and customize the file according to your configuration. For example:- Specify the directory that contains the HTML files. Also specify this mount point when adding the service to the cluster configuration. It is only required to change this field if the mount point for the web site's content differs from the default setting of
/var/www/html/. For example:DocumentRoot "/mnt/httpdservice/html"
DocumentRoot "/mnt/httpdservice/html"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Specify a unique IP address to which the service will listen for requests. For example:
Listen 192.168.1.100:80
Listen 192.168.1.100:80Copy to Clipboard Copied! Toggle word wrap Toggle overflow This IP address then must be configured as a cluster resource for the service using the Cluster Configuration Tool. - If the script directory resides in a non-standard location, specify the directory that contains the CGI programs. For example:
ScriptAlias /cgi-bin/ "/mnt/httpdservice/cgi-bin/"
ScriptAlias /cgi-bin/ "/mnt/httpdservice/cgi-bin/"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Specify the path that was used in the previous step, and set the access permissions to default to that directory. For example:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Additional changes may need to be made to tune the Apache HTTP Server or add module functionality. For information on setting up other options, refer to the Red Hat Enterprise Linux System Administration Guide and the Red Hat Enterprise Linux Reference Guide.
- The standard Apache HTTP Server start script,
/etc/rc.d/init.d/httpdis also used within the cluster framework to start and stop the Apache HTTP Server on the active cluster node. Accordingly, when configuring the service, specify this script by adding it as a resource in the Cluster Configuration Tool. - Copy the configuration file over to the other nodes of the cluster (or nodes of the failover domain, if configured).
Before the service is added to the cluster configuration, ensure that the Apache HTTP Server directories are not mounted. Then, on one node, invoke the Cluster Configuration Tool to add the service, as follows. This example assumes a failover domain named
httpd-domain was created for this service.
- Add the init script for the Apache HTTP Server service.
- Select the tab and click . The Resources Configuration properties dialog box is displayed.
- Select form the drop down menu.
- Enter a to be associated with the Apache HTTP Server service.
- Specify the path to the Apache HTTP Server init script (for example,
/etc/rc.d/init.d/httpd) in the field. - Click .
- Add a device for the Apache HTTP Server content files and/or custom scripts.
- Click .
- In the Resource Configuration dialog, select from the drop-down menu.
- Enter the for the resource (for example,
httpd-content. - Choose from the drop-down menu.
- Enter the mount point in the field (for example,
/var/www/html/). - Enter the device special file name in the field (for example,
/dev/sda3).
- Add an IP address for the Apache HTTP Server service.
- Click .
- Choose from the drop-down menu.
- Enter the to be associated with the Apache HTTP Server service.
- Make sure that the checkbox is left checked.
- Click .
- Click the property.
- Create the Apache HTTP Server service.
- Click . Type a for the service in the Add a Service dialog.
- In the Service Management dialog, select a from the drop-down menu or leave it as .
- Click the button. From the available list, choose each resource that you created in the previous steps. Repeat this step until all resources have been added.
- Click .
- Choose => to save your changes.