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.
<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>
curl https://exampleconfig.com/api/v1/config/original/45ed6a20d7ff26b62d873585bc1b42ca?hint=000-default.conf
wget -O 000-default.conf https://exampleconfig.com/api/v1/config/original/45ed6a20d7ff26b62d873585bc1b42ca?hint=000-default.conf
<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.
sudo apk add apache2
sudo apt update && sudo apt install apache2
sudo yum install httpd
sudo apt update && sudo apt install apache2
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.