Skip Navigation Links | |
Exit Print View | |
![]() |
Oracle Solaris Cluster Data Service for Apache Guide Oracle Solaris Cluster |
1. Installing and Configuring Oracle Solaris Cluster HA for Apache
Overview of the Installation and Configuration Process for Oracle Solaris Cluster HA for Apache
Installing and Configuring Apache
Installing a Non-Secure Apache Webserver
How to Install and Configure the Apache Software From the Solaris CD-ROM
How to Install and Configure the Apache Software from the Apache Web Site
Installing a Secure Apache Webserver
How to Install and Configure the Apache Software Using mod_ssl
How to Install and Configure the Apache Software Using apache-ssl
Installing the HA for Apache Packages
How to Install the HA for Apache Packages
Registering and Configuring Oracle Solaris Cluster HA for Apache
Setting Oracle Solaris Cluster HA for Apache Extension Properties
Example-- Setting Monitor_Uri_List for Scalable HA for Apache Instance
Example-- Setting Monitor_Uri_List for Failover HA for Apache Instance
Tools for Registering and Configuring HA for Apache
How to Register and Configure the Oracle Solaris Cluster HA for Apache by Using clsetup
How to Configure SUNW.HAStoragePlus Resource Type
How to Verify Data Service Installation and Configuration
Tuning the Oracle Solaris Cluster HA for Apache Fault Monitor
Operations by the Oracle Solaris Cluster HA for Apache Fault Monitor
Operations by the Fault Monitor Before a Probe
Operations for a Nonsecure Web Server
Operations for a Monitored URI List
Operations for a Secure Web Server
Upgrading the SUNW.apache Resource Type
Information for Registering the New Resource Type Version
Information for Migrating Existing Instances of the Resource Type
Before you install Oracle Solaris Cluster HA for Apache, update the following information in the Apache configuration file httpd.conf.
Note - The location of the httpd.conf file varies according to installation. System administrators typically install the httpd.conf file on the cluster file system. The default installation places the httpd.conf file in the /usr/local/apache/conf directory. When installing Apache packages bundled with Solaris, the file is located in the /etc/apache directory.
The ServerName directive that contains the hostname – For Oracle Solaris Cluster HA for Apache to be highly available, you must set this directive to the name of the network address (logical hostname or shared address) that is used to access the server. You should have set up the logical hostname or shared address when you installed the cluster. See the Oracle Solaris Cluster Concepts Guide for details on network resources.
The BindAddress directive, which you must set to the logical host or shared address – You can configure Apache to bind to INADDR_ANY. However, each resource must bind to a unique combination of network resource and port number. For example, if you run multiple resources, you can use INADDR_ANY provided that the port number for each resource is different.
The ServerType directive – This directive must be set to standalone, the default.
Multiple instances of Apache – If you have multiple instances of Apache, you must manage each instance with a separate resource. Furthermore, each separate resource must have a unique Bin_dir setting. Under the specified Bin_dir property that starts the particular instance of Apache, an apachectl script must exist.
Note - Different Apache resources can share the same httpd binary, that is, the apachectl scripts for different resources can specify the path to the same httpd binary. However, you must modify each apachectl script to use a different configuration file for specific Apache resources. To do so, use the -f option of the httpd command to specify a specific httpd.conf file.
The DocumentRoot directive that specifies the location of the documentation root directory – This directive is a pointer to a location on the cluster file system, where the HTML documents are installed.
The ScriptAlias directive that contains the location on a cluster file system of the cgi-bin directory – This directive is a pointer to a location on the cluster file system, where the cgi-bin files are installed.
Note - You must follow certain conventions when you configure URL mappings for the web server. For example, when setting the CGI directory, locate the CGI directory on the cluster file system to preserve availability. For example, you might map your CGI directory to /global/diskgroup/ServerRoot/cgi-bin, where diskgroup is the disk device group that contains the Apache software. In situations where the CGI programs access “back-end” servers, such as an RDBMS, ensure that the Oracle Solaris Cluster software controls the “back-end” server. If the server is an RDBMS that the Oracle Solaris Cluster software supports, use one of the highly available RDBMS packages. Alternatively, you can use the APIs that the Oracle Solaris Cluster Data Services Developer’s Guide explains to put the server under Oracle Solaris Cluster control.
The lock file – If you use a lock file, set the value of the LockFile directive in your httpd.conf file to a local file.
The PidFile directive – Point this directive to a local file, as in the following example.
PidFile /local/apache/log/httpd.pid
Note - While using Apache 2.0 with HA for Apache, ensure that the directory to which the PidFile directive in the configuration file references exists and proper permissions are assigned. Before you install the HA for Apache package, verify that the Apache software is properly installed and configured to run on a cluster.
In Apache 2.0, the PidFile directive can be modified to point to /local/apache/log/httpd.pid. Since this directory does not exist by default, you are required to create it manually or the resource will not start.
The Port directive setting that the server port or ports access – The defaults are set in each node's httpd.conf file. The Port_list resource property must include all of the ports that the httpd.conf files specify.
The Port_list property assumes that the web server serves all combinations of ports and IP addresses from the network resources as defined in the resource_dependencies property.
Port_list=”80/tcp,443/tcp,8080/tcp”
The preceding Port_list configuration, for example, probes the following IP-port combinations.
|
However, if node1 serves ports 80 and 443 only and node2 serves ports 80 and 8080 only, you can configure the Port_list property for Apache as follows.
Port_list=node1/80/tcp,node1/443/tcp,node2/80/tcp,node2/8080/tcp
Consider the following rules.
You must specify hostnames or IP addresses (not network resource names) for node1 and node2.
If Apache serves nodeN/port for every nodeN in the resource_dependencies property, you can use a short form to replace the combination of, for example, node1/port1, node2/port2, and so on. See the following examples.
Example One
Port_list=”80/tcp,node1/443/tcp,node2/8080/tcp” resource_dependencies=node1,node2
This example probes the following IP-port combinations.
|
Example Two
Port_list=”node1/80/tcp,node2/80/tcp” resource_dependencies=net-1,net-2 #net-1 contains node1. #net-2 contains node2 and node3.
This example probes the following IP-port combinations.
|
All of the hostnames (IP addresses) that the Port_list property specifies must not belong to a network resource that is specified in any other scalable resource's Resource_dependencies property. Otherwise, as soon as a scalable service detects that another scalable resource already uses an IP address, creation of the Apache resource fails.
Note - The Apache resource can use an already created shared address resource provided they listen to a port or port list that is not being used on that shared address.
Apache Proxy Server – Add the following lines of code to the httpd.conf file if you choose to configure the Apache software as a proxy server.
# Proxy Server Directives. <IfModule mod_proxy.c> ProxyRequests On <Directory proxy:*> Order deny,allow Deny from all Allow from IP_ADDRESS </Directory> ProxyVia On </IfModule> # End of Proxy Server Direcives.
Note - If you run Oracle Solaris Cluster HA for Apache and another HTTP server, configure the HTTP servers to listen on different ports. Otherwise, a port conflict can occur between the two servers.
To register and configure Oracle Solaris Cluster HA for Apache, you must consider or provide information on the following points.
Decide whether to run Oracle Solaris Cluster HA for Apache as a failover or scalable data service.
Decide whether to install a secure or non secure version of the Apache webserver.
Decide which fault monitoring resource properties to set. In most cases, the default values suffice. See Oracle Solaris Cluster Data Services Planning and Administration Guide Oracle Solaris Cluster Data Services Planning and Administration Guidefor information about the standard properties and Appendix A, HA for Apache Extension Properties for information about the extension properties.
Provide the name of the resource type for Oracle Solaris Cluster HA for Apache. This name is SUNW.apache.
Provide the names of the cluster nodes that will master the data service.
Provide the logical hostname (failover services) or shared address (scalable services) that clients use to access the data service. You typically set up this IP address when you install the cluster. See the Oracle Solaris Cluster Concepts Guide for details on network resources.
Provide the path to the application binaries. You can install the binaries on the local disks or on the cluster file system. See Configuration Guidelines for Oracle Solaris Cluster Data Services in Oracle Solaris Cluster Data Services Planning and Administration Guide for a discussion of the advantages and disadvantages of each location.
Modify each copy of apachectl to use the appropriate httpd.conf configuration file.
Exercise caution when you change the Load_balancing_weights property for an online scalable service that has the Load_balancing_policy property set to LB_STICKY or LB_STICKY_WILD. Changing these properties while the service is online can cause existing client affinities to be reset, hence a different node might service a subsequent client request even if another cluster member previously serviced the client.
Similarly, when a new instance of the service is started on a cluster, existing client affinities might be reset.
Determine the entry for the Port_list property. The Port_list property can have multiple entries. See How to Register and Configure Oracle Solaris Cluster HA for Apache by Using Oracle Solaris Cluster Command Line Interface (CLI) for details.
Determine whether to utilize the Monitor_Uri_List extension property. This extension property enables you to monitor an arbitrary list of URIs. Arbitrary monitoring of URIs is beneficial if you require the HA for Apache agent probe to monitor any applications (URIs) deployed on the HA for Apache server. Use of the Monitor_Uri_List extension property is not supported with secure instances of HA for Apache. You must install release 3.1 10/03 or 3.2 of HA for Apache to use this property. If you are upgrading HA for Apache from a previous version, you must perform a resource type upgrade procedure to use the new property. For instructions, see Upgrading a Resource Type in Oracle Solaris Cluster Data Services Planning and Administration Guide. See Monitoring Arbitrary URIs for detailed information about using the Monitor_Uri_List extension property.