Live demo · srv1957161.hstgr.cloud

Default pages: what a web server shows
before you configure anything

Install Apache or Nginx and hit the server's address, and you get a stock welcome page. Both are rendered live below — real HTTP responses from this server, not screenshots. Knowing what these pages mean, and why you are seeing one, is a diagnostic shortcut: it tells you the server is running and that your virtual host is not the one answering.

The two stock pages, side by side

Apache2 Ubuntu Default Page

apache-default.srv1957161.hstgr.cloud
Verbatim from Ubuntu's apache2-data package (/usr/share/apache2/default-site/index.html), served from DocumentRoot /var/www/html. The grey-and-orange page every fresh apt install apache2 produces.

Welcome to nginx!

nginx-default.srv1957161.hstgr.cloud
Verbatim from the nginx-common package (/usr/share/nginx/html/index.html) — byte-identical to the page inside the official nginx Docker image. 615 bytes, no images, no external requests.

Open Apache default full-page → Open Nginx default full-page → Apache "It works!" (upstream) →

Three different Apache pages exist, and people confuse them. Upstream Apache ships a bare <p>It works!</p> — 191 bytes, what you get from the official httpd Docker image. Debian and Ubuntu replace it with the long styled page above. Same server, different packaging. If you are following a tutorial and your page looks nothing like the screenshot, that is usually why.

Where each default page lives

Apache (Debian/Ubuntu)Nginx (Debian/Ubuntu)
Default document root/var/www/html/var/www/html
Stock page file/var/www/html/index.html/var/www/html/index.nginx-debian.html
Package source/usr/share/apache2/default-site//usr/share/nginx/html/
Config that serves itsites-available/000-default.confsites-available/default
Enabled viaa2ensite 000-defaultsymlink into sites-enabled/
Disable ita2dissite 000-default && systemctl reload apache2rm /etc/nginx/sites-enabled/default && nginx -s reload
Page titleApache2 Ubuntu Default Page: It worksWelcome to nginx!

The part that actually matters: the default server

A default page is just a file. The default server is a routing rule, and it is what bites you. When a request's Host header matches no configured name, neither server returns an error — each silently picks a fallback and serves it:

BehaviourApacheNginx
Fallback when no name matchesthe first <VirtualHost> loaded for that addressthe block marked default_server, else the first loaded
Made explicit byfile/alphabetical load order — 000-default is named that way on purposelisten 80 default_server;
Inspect it withapachectl -S → look for default servernginx -T \| grep -n default_server

So a hostname that resolves to your IP but has no vhost does not 404 — it renders the default site. On an unconfigured box that is the stock welcome page, which reads as "nothing is deployed here". On a busy server it is someone else's site, which reads as a much more alarming bug.

See the fallback happen

Two hostnames below have no vhost of their own. Neither Apache nor Nginx has a ServerName/server_name for them, so each falls back to its default and serves the stock page:

typo-apache… → Apache default typo-nginx… → Nginx default

# same server, an unconfigured name -- note the 200, not a 404
curl -s -o /dev/null -w '%{http_code}\n' https://typo-apache.srv1957161.hstgr.cloud/
curl -sI https://typo-nginx.srv1957161.hstgr.cloud/ | grep -i x-lab-vhost
#   x-lab-vhost: nginx DEFAULT server

# no DNS needed at all -- just lie about the Host header:
curl -s -H 'Host: anything-at-all' http://127.0.0.1/ | grep -o '<title>[^<]*'

That last trick is the fastest way to identify the default server on a box you did not configure: any bogus Host will do, and whatever answers is your fallback.

Reading a default page as a diagnostic

Leaving the default site enabled in production is a small information leak. It advertises your server software and distro to anyone who probes the bare IP. Once your real vhosts are live, either disable the default site or point it at a blank page or a hard 444/403 — and make sure your real site is not relying on being the fallback.

Try it on your own box

# Apache: which vhost is the default, and where did it come from?
apachectl -S
#   *:80  is a NameVirtualHost
#            default server apache-default.srv1957161.hstgr.cloud (httpd-vhosts.conf:16)

# Nginx: dump the merged config and find the default
nginx -T | grep -nE 'listen|server_name|root '

# Restore Ubuntu's stock Apache page if someone overwrote it
cp /usr/share/apache2/default-site/index.html /var/www/html/index.html

# Restore Nginx's
cp /usr/share/nginx/html/index.html /var/www/html/index.nginx-debian.html