Apache HTTP Server Version 2.4
|Provides better support for systemd integration
|Available in Apache 2.4.42 and later
This module provides support for systemd integration. It allows
httpd to be used in a service with the systemd
Type=notify (see systemd.service(5)
for more information). The module is activated if loaded.
[Unit] Description=The Apache HTTP Server After=network.target [Service] Type=notify ExecStart=/usr/local/apache2/bin/httpd -D FOREGROUND -k start ExecReload=/usr/local/apache2/bin/httpd -k graceful KillMode=mixed [Install] WantedBy=multi-user.target
Special attention should be given to how
KillMode are configured for the service. If
ExecStop command should be a
synchronous operation which itself exits when the daemon
has terminated. Running
httpd -k stop
asynchronously initiates daemon termination, so does not
satisfy this condition. The example above uses
KillMode=mixed so that systemd sends
SIGTERM to signal the parent process (and only the
parent) to shut down. The entire process group is then sent
TimeoutStopSec elapses, if
any processes are still running. See systemd.kill(5)
for more information.
This module does not provide support for Systemd socket activation.
enabled by default if the module is loaded. If
ExtendedStatus is not disabled in
the configuration, run-time load and request statistics are made
available in the
systemctl status output.