File: //usr/lib/systemd/system/httpd.service
[Unit]
Description=Apache web server managed by cPanel EasyApache
ConditionPathExists=!/etc/httpddisable
ConditionPathExists=!/etc/apachedisable
ConditionPathExists=!/etc/httpdisable
After=network-online.target remote-fs.target nss-lookup.target
Wants=network-online.target
[Service]
#KillMode=none
Type=forking
ExecStart=/usr/local/cpanel/scripts/restartsrv_httpd --no-verbose
ExecStop=/usr/local/cpanel/scripts/restartsrv_httpd stop --no-verbose
ExecReload=/usr/local/cpanel/scripts/restartsrv_httpd --no-verbose
PIDFile=/run/apache2/httpd.pid
TimeoutStartSec=2m
TimeoutStopSec=20s
# Block apache
#ProtectSystem=no
#ProtectKernelModules=false
#ProtectKernelLogs=false
#RestrictAddressFamilies=
#ReadWritePaths=/var/run
#ReadWritePaths=/etc/apache2/logs
[Install]
WantedBy=multi-user.target