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

Original 📋 Ubuntu 24.04 LTS (Noble Numbat) 29 lines

Works On

Viewing:
Ubuntu 24.04 LTS (Noble Numbat)
Same on:
Debian 13 (Trixie)
Other versions:

Details

Size
29 lines
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>

Copy & Paste

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

For AI Agents

<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>

Paste into Claude, ChatGPT, or any AI assistant.

Install Apache HTTP Server

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

File Location

File Path
/etc/apache2/sites-available/000-default.conf
Directory
/etc/apache2/sites-available/
Significance
System-wide configuration directory
Description
Files in /etc/ contain system-wide configuration settings that affect all users.

FAQ

When should I use this 000-default.conf?

Use it to restore a missing default, confirm what shipped, or diff against your current Apache HTTP Server config.

How do I restore Apache HTTP Server defaults?

Download the file, back up the current one in /etc/apache2/sites-available/000-default.conf, replace it, then reload or restart Apache HTTP Server.

Is 000-default.conf safe for production?

It is the vendor default for Ubuntu 24.04 LTS (Noble Numbat). Treat it as a baseline and review security and performance settings before production use.

How does this differ from other OS versions?

Defaults vary by distro and version. This copy matches Ubuntu 24.04 LTS (Noble Numbat).

Can I use this for Apache HTTP Server troubleshooting?

Yes. Diff it against yours to find drift, then restore only the sections you need.