A web server is a computer program (or sometimes a physical machine) that:
Receives web requests (usually over the internet),
Processes them, and
Sends back responses (like web pages, files, or data).
It works using the HTTP (or HTTPS) protocol — the same protocol used by your browser to load websites.
🛠️ Web Server = Hardware + Software
| Part | Description |
|---|---|
| 🖥️ Hardware | A computer or cloud server that stores website files and is always online. |
| ⚙️ Software | A program like Apache, Nginx, or Express.js that listens for requests and sends back responses. |
**Look How a Web Server Works
📦 Types of Content a Web Server Can Serve
| Content Type | Example | Sent As |
|---|---|---|
| Static | HTML, CSS, images, JS files | Files |
| Dynamic | Pages built using databases or logic | HTML or JSON |
| API responses | Data like { "user": "John" } | JSON |