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.
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.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) →
<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.| 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 it | sites-available/000-default.conf | sites-available/default |
| Enabled via | a2ensite 000-default | symlink into sites-enabled/ |
| Disable it | a2dissite 000-default && systemctl reload apache2 | rm /etc/nginx/sites-enabled/default && nginx -s reload |
| Page title | Apache2 Ubuntu Default Page: It works | Welcome to nginx! |
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:
| Behaviour | Apache | Nginx |
|---|---|---|
| Fallback when no name matches | the first <VirtualHost> loaded for that address | the block marked default_server, else the first loaded |
| Made explicit by | file/alphabetical load order — 000-default is named that way on purpose | listen 80 default_server; |
| Inspect it with | apachectl -S → look for default server | nginx -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.
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.
ServerName/server_name spelling, then that the site is enabled (a2ensite / sites-enabled symlink), then reload.index.html and listings are on (Options +Indexes / autoindex on). Turn them off in production; a listing exposes your file tree.x) on every component of the path.444/403 —
and make sure your real site is not relying on being the fallback.# 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