Skip to content

Instantly share code, notes, and snippets.

@saturn99
Forked from blacksaildivision/httpd.service
Created March 14, 2022 23:14
Show Gist options
  • Save saturn99/1189bc4c9f2dc9def282795578d220d5 to your computer and use it in GitHub Desktop.
Save saturn99/1189bc4c9f2dc9def282795578d220d5 to your computer and use it in GitHub Desktop.
SystemD (systemctl) script for managing Apache httpd compiled from source
[Unit]
Description=The Apache HTTP Server
After=network.target
[Service]
Type=forking
ExecStart=/usr/local/apache2/bin/apachectl -k start
ExecReload=/usr/local/apache2/bin/apachectl -k graceful
ExecStop=/usr/local/apache2/bin/apachectl -k graceful-stop
PIDFile=/usr/local/apache2/logs/httpd.pid
PrivateTmp=true
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment