Home

Vhost

Vhost, short for virtual host, is a server configuration concept used by web servers to host multiple websites from a single physical machine. Each virtual host defines settings such as the domain name, document root, and specific logging.

In practice, the web server uses the Host header from HTTP requests to select the appropriate virtual

There are two primary approaches: name-based virtual hosting and IP-based virtual hosting. Name-based hosting serves different

Common implementations: In Apache, virtual hosts are configured with blocks such as VirtualHost *:80 and include

Benefits include efficient resource use, simplified maintenance, and flexible hosting of multiple domains. Drawbacks can include

See also: web server, HTTP Host header, SSL/TLS, DNS.

host.
For
TLS,
Server
Name
Indication
(SNI)
allows
serving
multiple
SSL
certificates
on
one
IP
address,
enabling
secure
connections
for
multiple
vhosts.
DNS
maps
each
domain
to
the
server’s
IP,
while
the
server
routes
the
request
to
the
matching
vhost.
hostnames
over
the
same
IP,
while
IP-based
assigns
a
distinct
IP
per
vhost.
Port-based
hosting
is
rare
for
HTTP
but
conceptually
possible.
directives
such
as
ServerName
and
DocumentRoot.
In
Nginx,
the
equivalent
is
a
server
block
with
listen
directives
and
server_name,
plus
root
and
log
settings.
These
blocks
typically
live
in
separate
files
and
can
be
enabled
or
disabled
independently.
certificate
management
for
HTTPS,
potential
performance
tuning
needs,
and
the
need
for
careful
isolation
of
per-vhost
resources
and
permissions.