<div id="preamble"><h1>Apache Module mod_systemd</h1>
<div class="toplang">
<p><span>Available Languages: </span><a href="../en/mod/mod_systemd.html" title="English"> en </a> |
-<a href="../fr/mod/mod_systemd.html" hreflang="fr" rel="alternate" title="Français"> fr </a></p>
+<a href="../fr/mod/mod_systemd.html" hreflang="fr" rel="alternate" title="Français"> fr </a></p>
</div>
<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Provides better support for systemd integration</td></tr>
<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
-<tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>systemd_module</td></tr>
-<tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_systemd.c</td></tr></table>
+<tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>systemd_module</td></tr>
+<tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_systemd.c</td></tr>
+<tr><th><a href="module-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.4.42 and later</td></tr></table>
<h3>Summary</h3>
<p>This module provides support for systemd integration. It allows
<code>Type=notify</code> (see <a href="https://www.freedesktop.org/software/systemd/man/systemd.service.html">systemd.service(5)</a>
for more information). The module is activated if loaded.</p>
+ <div class="example"><h3>Example of systemd service unit (more settings are probably needed for production systems)</h3><pre>[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</pre></div>
+
+ <p>Special attention should be given to how <code>ExecStop</code>
+ and/or <code>KillMode</code> are configured for the service. If
+ configured, an <code>ExecStop</code> command should be a
+ <em>synchronous operation</em> which itself exits when the daemon
+ has terminated. Running <code>httpd -k stop</code>
+ <em>asynchronously</em> initiates daemon termination, so does not
+ satisfy this condition. The example above uses
+ <code>KillMode=mixed</code> so that systemd sends
+ <code>SIGTERM</code> to signal the parent process (and only the
+ parent) to shut down. The entire process group is then sent
+ <code>SIGKILL</code> after <code>TimeoutStopSec</code> elapses, if
+ any processes are still running. See <a href="https://www.freedesktop.org/software/systemd/man/systemd.kill.html">systemd.kill(5)</a>
+ for more information.</p>
+
+ <p>This module does not provide support for Systemd socket activation.</p>
+
<p><code class="directive"><a href="../mod/core.html#extendedstatus">ExtendedStatus</a></code> is
enabled by default if the module is loaded. If <code class="directive"><a href="../mod/core.html#extendedstatus">ExtendedStatus</a></code> is not disabled in
the configuration, run-time load and request statistics are made
</div>
<div class="bottomlang">
<p><span>Available Languages: </span><a href="../en/mod/mod_systemd.html" title="English"> en </a> |
-<a href="../fr/mod/mod_systemd.html" hreflang="fr" rel="alternate" title="Français"> fr </a></p>
+<a href="../fr/mod/mod_systemd.html" hreflang="fr" rel="alternate" title="Français"> fr </a></p>
</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />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 moderators 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 Freenode, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div>
<script type="text/javascript"><!--//--><![CDATA[//><!--
var comments_shortname = 'httpd';