Skip to content
BENIBIX Learn

Virtual Host vs Virtual Machine

People think a virtual host is a kind of virtual machine, and it is not. A virtual machine is a whole computer made in software. A virtual host is just a block of settings inside one web server. It lets that server answer for many site names. Both words start with virtual, but one splits a machine and the other splits a web server.

Infrastructure🌍 Web Serving & Nginx

Virtual Host

One web server that serves many sites. Each site has its own name and folder.

A virtual host lets one web server answer for many websites. Each site gets its own block of settings, with its own name and its own folder. When a request comes in, the server reads the site name the browser asked for. Then it picks the matching block. So one machine with one IP address can serve many sites.

Example
Emma's one server holds two sites with two names. Each name has its own virtual host and its own folder.
Why it matters
It is how one cheap server can hold many small sites.
Full entry
Infrastructure☁️ Virtualization & Cloud

Virtual Machine (VM)

A whole computer made in software. Lots of them can share one real box.

A virtual machine is a whole computer made in software. It has its own processor, memory, disk and system. All of them are borrowed from a real machine. Programs inside it act as if it were a real computer. Many virtual machines can share one server. You can start, stop, copy or delete one in minutes.

Example
Lucy needs a test server for one day. She starts a virtual machine with 2 vCPUs and 4 GB of memory, then deletes it the next evening.
Why it matters
Virtual machines are how most servers run today. They are quick to make, easy to copy and cheap to throw away.
Full entry

In one line

Virtual Host
One web server that serves many sites. Each site has its own name and folder.
Virtual Machine (VM)
A whole computer made in software. Lots of them can share one real box.