Nothing about this request went to a different machine, a different port, or a different
web server. Only the Host header changed — from apache-a… to
apache-b… — and Apache selected the second <VirtualHost> block, whose
DocumentRoot points somewhere else.
| vhost A | vhost B | |
|---|---|---|
| Host header | apache-a… | apache-b… |
DocumentRoot | /var/www/site-a | /var/www/site-b |
| Process | the same httpd, PID unchanged | |
| Listening socket | *:80 (one socket, both vhosts) | |
Because one process serves many names, "the site is broken" is almost never about the process. The
useful question is which vhost answered. If the wrong site's content appears, or a working
domain 404s while another is fine, the cause is name matching — a typo in
ServerName, a forgotten ServerAlias, or a vhost that was never enabled, so
Apache fell back to the first block it loaded.
# the fastest answer, on the server: apachectl -S # VirtualHost configuration: # *:80 is a NameVirtualHost # port 80 namevhost apache-a.srv1957161.hstgr.cloud (extra/httpd-vhosts.conf:9) # port 80 namevhost apache-b.srv1957161.hstgr.cloud (extra/httpd-vhosts.conf:28)
That output tells you the name, the file, and the line number. If a hostname is missing from the list, no amount of restarting will fix it — the config was never loaded.