An active-active Apache HTTPD cluster runs the web service on multiple nodes at the same time so traffic can be shared and a single node outage does not take the site offline.
A Pacemaker + Corosync cluster managed with the pcs CLI can control Apache HTTPD as a systemd resource and clone it so one instance runs per node. The cluster continuously monitors each instance and recovers failed services, while routing is handled separately by a load balancer or DNS.
Configuration files, enabled modules, and web content must match on every node because requests can land on any server at any time. Disable standalone service enablement so systemd does not start Apache HTTPD outside of cluster control, and plan session storage, TLS termination, and health checks before distributing production traffic.
$ sudo pcs status Cluster name: clustername Cluster Summary: * Stack: corosync (Pacemaker is running) * Current DC: node-01 (version 2.1.6-6fdc9deea29) - partition with quorum * Last updated: Thu Jan 1 00:49:38 2026 on node-01 ##### snipped #####
$ systemctl list-unit-files --type=service | grep -E '^(apache2|httpd)\.service' apache2.service disabled enabled
The unit name is referenced in pcs as systemd:httpd or systemd:apache2.
$ sudo apachectl configtest Syntax OK
Use apache2ctl configtest when apachectl is not present.
Related: How to test Apache configuration
$ sudo systemctl disable --now apache2 Synchronizing state of apache2.service with SysV service script with /usr/lib/systemd/systemd-sysv-install. Executing: /usr/lib/systemd/systemd-sysv-install disable apache2 Synchronizing state of apache2.service with SysV service script with /usr/lib/systemd/systemd-sysv-install. Executing: /usr/lib/systemd/systemd-sysv-install disable apache2 Synchronizing state of apache2.service with SysV service script with /usr/lib/systemd/systemd-sysv-install. Executing: /usr/lib/systemd/systemd-sysv-install disable apache2
Apache HTTPD stops immediately on that node until the cloned cluster resource is started.
$ sudo pcs resource create apache_service systemd:apache2 op monitor interval=30s
Run pcs configuration changes on a single cluster node only.
Use systemd:apache2 when that unit is present.
Related: How to create a Pacemaker resource
$ sudo pcs resource clone apache_service
A clone starts one instance per eligible node by default.
$ sudo pcs status resources
* Clone Set: dummy-check-clone [dummy-check]:
* Started: [ node-01 node-02 node-03 ]
##### snipped #####
* Clone Set: apache_service-clone [apache_service]:
* Started: [ node-01 node-02 node-03 ]
$ curl -sI http://192.0.2.11/ HTTP/1.1 200 OK Date: Thu, 01 Jan 2026 00:49:46 GMT Server: Apache/2.4.58 (Ubuntu) Last-Modified: Thu, 01 Jan 2026 00:28:55 GMT ETag: "3-64748ad945d38" Accept-Ranges: bytes Content-Length: 3 Content-Type: text/html $ curl -sI http://192.0.2.12/ HTTP/1.1 200 OK Date: Thu, 01 Jan 2026 00:49:46 GMT Server: Apache/2.4.58 (Ubuntu) Last-Modified: Thu, 01 Jan 2026 00:28:59 GMT ETag: "3-64748adcb6328" Accept-Ranges: bytes Content-Length: 3 Content-Type: text/html
Use a load balancer or DNS records that include every active node address, and configure health checks to remove failed nodes from rotation.