File: //etc/systemd/system/httpd.service
# httpd binary startup for DirectAdmin servers
# To specify environment options, please use
# environment line in [Service] like:
# [Service]
# Environment=OPTIONS=-DMY_DEFINE
# To reload systemd daemon after changes to this file:
# systemctl --system daemon-reload
[Unit]
Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target
[Service]
Type=notify
Environment=LANG=C
UMask=0022
ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND
ExecReload=/usr/sbin/httpd $OPTIONS -k graceful
ExecStop=/bin/kill -WINCH ${MAINPID}
# We want systemd to give httpd some time to finish gracefully, but still want
# it to kill httpd after TimeoutStopSec if something went wrong during the
# graceful stop. Normally, Systemd sends SIGTERM signal right after the
# ExecStop, which would kill httpd. We are sending useless SIGCONT here to give
# httpd time to finish.
KillSignal=SIGCONT
TimeoutStopSec=5s
PrivateTmp=true
LimitMEMLOCK=infinity
LimitNOFILE=655350
[Install]
WantedBy=multi-user.target