2026-03-12 21:01:38

This commit is contained in:
2026-03-12 22:01:38 +01:00
parent 3bd1db26cc
commit 26296b6d6a
336 changed files with 27507 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
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.