Configuring the web server as a cluster resource
You will recall from when we configured the virtual IP in Chapter 2, Installing Cluster Services and Configuring Network Components, and when we added replicated storage earlier during this chapter that we must indicate a way for PCS to check on a periodic basis whether the resource is available or not.
In this case, we will use the server status page (http://node0[1-2]/server-status
), which is the preferred Apache web page as it provides information about how well the server will be performing PCS will query this page once per minute. This is accomplished by creating a file named status.conf
inside /etc/httpd/conf.d
on both nodes:
<Location /server-status> SetHandler server-status Order deny,allow Deny from all Allow from 127.0.0.1 </Location>
Then, with the following command, we will add Apache as a cluster resource. The status of the resource will be checked by PCS once every minute:
pcs resource create webserver ocf:heartbeat...