Apache HTTP Server /etc/systemd/httpd.service

Original 📋 Red Hat Enterprise Linux 9 (Plow) 33 Zeilen

Läuft auf

Ansicht:
Red Hat Enterprise Linux 9 (Plow)
Gleich auf:
CentOS Stream 9
Andere Versionen:

Details

Größe
33 Zeilen
MD5
091091cbdaf85612b9e0130a96384a7d
SHA256
e6cafe103837284b2ca48bcfc7f97a732c73f4dceaf2cd1fb4dc1c82c8779c79
/etc/systemd/httpd.service
# See httpd.service(8) for more information on using the httpd service.

# Modifying this file in-place is not recommended, because changes
# will be overwritten during package upgrades.  To customize the
# behaviour, run "systemctl edit httpd" to create an override unit.

# For example, to pass additional options (such as -D definitions) to
# the httpd binary at startup, create an override unit (as is done by
# systemctl edit) and enter the following:

#	[Service]
#	Environment=OPTIONS=-DMY_DEFINE

[Unit]
Description=The Apache HTTP Server
Wants=httpd-init.service
After=network.target remote-fs.target nss-lookup.target httpd-init.service
Documentation=man:httpd.service(8)

[Service]
Type=notify
Environment=LANG=C

ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND
ExecReload=/usr/sbin/httpd $OPTIONS -k graceful
# Send SIGWINCH for graceful stop
KillSignal=SIGWINCH
KillMode=mixed
PrivateTmp=true
OOMPolicy=continue

[Install]
WantedBy=multi-user.target

Kopieren & Einfügen

curl:
curl https://exampleconfig.com/api/v1/config/original/091091cbdaf85612b9e0130a96384a7d?hint=httpd.service
wget:
wget -O httpd.service https://exampleconfig.com/api/v1/config/original/091091cbdaf85612b9e0130a96384a7d?hint=httpd.service

Für KI-Agenten

<prompt><role>DevOps agent</role><source url='https://exampleconfig.com/api/v1/config/original/091091cbdaf85612b9e0130a96384a7d?hint=httpd.service' /><config><app>Apache HTTP Server</app><os>Red Hat Enterprise Linux 9 (Plow)</os><location>/etc/systemd/httpd.service</location><lines>33</lines><md5>091091cbdaf85612b9e0130a96384a7d</md5><sha256>e6cafe103837284b2ca48bcfc7f97a732c73f4dceaf2cd1fb4dc1c82c8779c79</sha256></config></prompt>

Füge es in Claude, ChatGPT oder einen anderen KI-Assistenten ein.

Apache HTTP Server installieren

Alpine Linux

sudo apk add apache2

Debian

sudo apt update && sudo apt install apache2

Red Hat Enterprise Linux

sudo yum install httpd

Ubuntu

sudo apt update && sudo apt install apache2

Ablageort

Pfad
/etc/systemd/httpd.service
Verzeichnis
/etc/systemd/
Bedeutung
Systemweites Konfig-Verzeichnis
Beschreibung
In /etc/ liegen systemweite Einstellungen, die alle Benutzer betreffen.

FAQ

Wann sollte ich httpd.service verwenden?

Nutze sie, um eine fehlende Default-Datei wiederherzustellen, zu prüfen, was ausgeliefert wurde, oder sie gegen deine aktuelle Apache HTTP Server-Config zu diffen.

Wie stelle ich die Defaults von Apache HTTP Server wieder her?

Lad die Datei runter, sichere die aktuelle in /etc/systemd/httpd.service, ersetze sie und lade Apache HTTP Server neu oder starte es neu.

Ist httpd.service für den produktiven Einsatz geeignet?

Das ist der Hersteller-Default für Red Hat Enterprise Linux 9 (Plow). Nimm sie als Basis und prüf Security- und Performance-Einstellungen, bevor du sie produktiv nutzt.

Wie unterscheidet sich das von anderen OS-Versionen?

Defaults variieren je nach Distro und Version. Diese Version passt zu Red Hat Enterprise Linux 9 (Plow).

Kann ich das fürs Troubleshooting von Apache HTTP Server nutzen?

Ja. Diff es gegen deine Version, finde Abweichungen und stell nur die Teile wieder her, die du brauchst.