Virtual hosting is a method for sharing multiple domain names on a
single instance of a server. The client provides the server with the
hostname that it has used to establish the connection, and that name
is compared against a table of virtual hosts configured for the
server. If the hostname matches a virtual host, the client will use
the root directory and any virtual paths that have been assigned to
that host.
When the server is first started, a default virtual host with an ID
of zero is automatically created and is identified as
VIRTUAL_HOST_DEFAULT. This virtual host uses the same hostname, port
number and root directory that the server instance was created with.
The application should treat all other host IDs as opaque values and
never make assumptions about how they are allocated.
The nHostPort parameter should always be specified with a
value of zero, or the same port number that the server was configured
to use. Port-based virtual hosting is currently not supported and this
parameter is included for future use.