Ravi Sir's Cyber Security Cards › Interview Cards
What is a virtual host or server block?
What is a virtual host or server block? A virtual host (server block) maps a hostname or port to a site folder, so one machine can host several sites. On one server: shop.example.com and warehouse.example.com, each with its own root folder and log files. “A server block maps a hostname to a site roo

Read card text
What this card says
Short answer
A virtual host (server block) maps a hostname or port to a site folder, so one machine can host several sites.
Example
On one server: shop.example.com and warehouse.example.com, each with its own root folder and log files.
Say it in the interview
“A server block maps a hostname to a site root, so one box runs many sites with separate logs.”
Why it matters
Separate roots and logs keep sites isolated, so one site’s problem doesn’t leak into another.
Learn more in the lesson: 46.4 Web Servers and MySQL Interview Questions