created: 20190617091940764 creator: vplesnila modified: 20200122095305456 modifier: vplesnila tags: Linux [[Apache HTTPD]] title: Apache httpd starting with systemd type: text/vnd.tiddlywiki Create `httpd.service` unit file in `/usr/lib/systemd/system` ``` [Unit] Description=Apache Web Server After=network.target [Service] Type=forking PIDFile=/app/apache_httpd/2.4.39/logs/httpd.pid ExecStart=/app/apache_httpd/2.4.39/bin/apachectl start ExecStop=/app/apache_httpd/2.4.39/bin/apachectl graceful-stop ExecReload=/app/apache_httpd/2.4.39/bin/apachectl graceful PrivateTmp=true LimitNOFILE=infinity [Install] WantedBy=multi-user.target ``` ``` systemctl daemon-reload systemctl enable httpd systemctl stop httpd systemctl start httpd systemctl status httpd ``` //Note//: in 2.4.41 version, PIDFile in unit definition do not works.