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.
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.
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.
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.