<-
Apache > HTTP Server > Documentation > Modules

Apache Module mod_systemd e1o38

Available Languages:  fr 

Description: Provides better for systemd integration
Status: Extension
Module Identifier: systemd_module
Source File: mod_systemd.c
Compatibility: Available in Apache 2.4.42 and later

Summary 6m2os

This module provides 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.

Example of systemd service unit (more settings are probably needed for production systems) 5940d

[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-.target

Special attention should be given to how ExecStop and/or KillMode are configured for the service. If configured, an 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 SIGKILL after TimeoutStopSec elapses, if any processes are still running. See systemd.kill(5) for more information.

This module does not provide for Systemd socket activation.

ExtendedStatus is not disabled in the configuration, run-time load and request statistics are made available in the systemctl status output.

 Apache!

Directives 1a4l6m

This module provides no directives.

Bugfix checklist 4i2533

See also 27136x

Available Languages:  fr 

top

Comments 2p1l6j

Notice:
This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our s if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our mailing lists.