Apache HTTP Server /etc/apache2/conf.d/default.conf

Original 📋 Alpine Linux v3.21 70 Zeilen

Läuft auf

Ansicht:
Alpine Linux v3.21
Gleich auf:
Andere Versionen:

Details

Größe
70 Zeilen
MD5
557a5ba2f7ee33171e90190eb6ef8f88
SHA256
ef417e33de3b08faa204411fed29bb5e88d8c6945b93d50af1b0984a7129a4c0
/etc/apache2/conf.d/default.conf
#
# This configuration file reflects default settings for Apache HTTP Server.
#
# You may change these, but chances are that you may not need to.
#

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 60

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 5

#
# UseCanonicalName: Determines how Apache constructs self-referencing 
# URLs and the SERVER_NAME and SERVER_PORT variables.
# When set "Off", Apache will use the Hostname and Port supplied
# by the client.  When set "On", Apache will use the value of the
# ServerName directive.
#
UseCanonicalName Off

#
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride 
# directive.
#
AccessFileName .htaccess

#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off

#
# Set a timeout for how long the client may take to send the request header
# and body.
# The default for the headers is header=20-40,MinRate=500, which means wait
# for the first byte of headers for 20 seconds. If some data arrives,
# increase the timeout corresponding to a data rate of 500 bytes/s, but not
# above 40 seconds.
# The default for the request body is body=20,MinRate=500, which is the same
# but has no upper limit for the timeout.
# To disable, set to header=0 body=0
#
<IfModule reqtimeout_module>
  RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500
</IfModule>

Kopieren & Einfügen

curl:
curl https://exampleconfig.com/api/v1/config/original/557a5ba2f7ee33171e90190eb6ef8f88?hint=default.conf
wget:
wget -O default.conf https://exampleconfig.com/api/v1/config/original/557a5ba2f7ee33171e90190eb6ef8f88?hint=default.conf

Für KI-Agenten

<prompt><role>DevOps agent</role><source url='https://exampleconfig.com/api/v1/config/original/557a5ba2f7ee33171e90190eb6ef8f88?hint=default.conf' /><config><app>Apache HTTP Server</app><os>Alpine Linux v3.21</os><location>/etc/apache2/conf.d/default.conf</location><lines>70</lines><md5>557a5ba2f7ee33171e90190eb6ef8f88</md5><sha256>ef417e33de3b08faa204411fed29bb5e88d8c6945b93d50af1b0984a7129a4c0</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/apache2/conf.d/default.conf
Verzeichnis
/etc/apache2/conf.d/
Bedeutung
Systemweites Konfig-Verzeichnis
Beschreibung
In /etc/ liegen systemweite Einstellungen, die alle Benutzer betreffen.

FAQ

Wann sollte ich default.conf 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/apache2/conf.d/default.conf, ersetze sie und lade Apache HTTP Server neu oder starte es neu.

Ist default.conf für den produktiven Einsatz geeignet?

Das ist der Hersteller-Default für Alpine Linux v3.21. 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 Alpine Linux v3.21.

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.