Apache HTTP Server /etc/apache2/sites-available/000-default.conf

Original 📋 Ubuntu 24.04 LTS (Noble Numbat) 29 Zeilen

Läuft auf

Ansicht:
Ubuntu 24.04 LTS (Noble Numbat)
Gleich auf:
Debian 13 (Trixie)
Andere Versionen:

Details

Größe
29 Zeilen
MD5
45ed6a20d7ff26b62d873585bc1b42ca
SHA256
39fe841a64538ee980ae4ef011bdf6ae7124f63bf44afd65553cf3e0618e952c
/etc/apache2/sites-available/000-default.conf
<VirtualHost *:80>
	# The ServerName directive sets the request scheme, hostname and port that
	# the server uses to identify itself. This is used when creating
	# redirection URLs. In the context of virtual hosts, the ServerName
	# specifies what hostname must appear in the request's Host: header to
	# match this virtual host. For the default virtual host (this file) this
	# value is not decisive as it is used as a last resort host regardless.
	# However, you must set it for any further virtual host explicitly.
	#ServerName www.example.com

	ServerAdmin webmaster@localhost
	DocumentRoot /var/www/html

	# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
	# error, crit, alert, emerg.
	# It is also possible to configure the loglevel for particular
	# modules, e.g.
	#LogLevel info ssl:warn

	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined

	# For most configuration files from conf-available/, which are
	# enabled or disabled at a global level, it is possible to
	# include a line for only one particular virtual host. For example the
	# following line enables the CGI configuration for this host only
	# after it has been globally disabled with "a2disconf".
	#Include conf-available/serve-cgi-bin.conf
</VirtualHost>

Kopieren & Einfügen

curl:
curl https://exampleconfig.com/api/v1/config/original/45ed6a20d7ff26b62d873585bc1b42ca?hint=000-default.conf
wget:
wget -O 000-default.conf https://exampleconfig.com/api/v1/config/original/45ed6a20d7ff26b62d873585bc1b42ca?hint=000-default.conf

Für KI-Agenten

<prompt><role>DevOps agent</role><source url='https://exampleconfig.com/api/v1/config/original/45ed6a20d7ff26b62d873585bc1b42ca?hint=000-default.conf' /><config><app>Apache HTTP Server</app><os>Ubuntu 24.04 LTS (Noble Numbat)</os><location>/etc/apache2/sites-available/000-default.conf</location><lines>29</lines><md5>45ed6a20d7ff26b62d873585bc1b42ca</md5><sha256>39fe841a64538ee980ae4ef011bdf6ae7124f63bf44afd65553cf3e0618e952c</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/sites-available/000-default.conf
Verzeichnis
/etc/apache2/sites-available/
Bedeutung
Systemweites Konfig-Verzeichnis
Beschreibung
In /etc/ liegen systemweite Einstellungen, die alle Benutzer betreffen.

FAQ

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

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

Das ist der Hersteller-Default für Ubuntu 24.04 LTS (Noble Numbat). 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 Ubuntu 24.04 LTS (Noble Numbat).

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.