# Web Server

> A program that answers web requests. It sends back pages and files.

**Field:** Infrastructure  
**Category:** Web Serving & Nginx  
**Also known as:** HTTP Server, Web Server Software

## Think of it like

It is like a clerk behind a shop counter. You ask for an item, and the clerk fetches it for you.

## Definition

A web server is a program that answers HTTP requests. A browser asks for a page, and the web server sends back the file or the answer. It listens on port 80 for HTTP and port 443 for HTTPS. It can hand out files from a folder, or pass the request on to an app. The word also means the computer that runs this program.

## Example

Emma puts her site's files on a server running Nginx. When someone visits, Nginx reads index.html from the folder and sends it back.

## Why it matters

Every website sits behind one. It is the first thing a visitor's request reaches.

## Common mistake

Using web server to mean only the machine. Most often it means the program, and one machine can run several.

## Three principles

- **Answers HTTP.** Requests in, responses out.
- **Ports 80 and 443.** Plain and secure web traffic.
- **Files or apps.** Serves files, or passes to an app.

## Related terms

- [HyperText Transfer Protocol (HTTP)](https://learn.benibix.com/term/infrastructure/http)
- [Network Port](https://learn.benibix.com/term/infrastructure/port)
- [Nginx](https://learn.benibix.com/term/infrastructure/nginx)
- [Apache HTTP Server](https://learn.benibix.com/term/infrastructure/apache-http-server)
- [Application Server](https://learn.benibix.com/term/infrastructure/application-server)
- [Document Root](https://learn.benibix.com/term/infrastructure/document-root)
- [Static Website](https://learn.benibix.com/term/development/static-website)

## Told apart from

- [Web Server vs Application Server](https://learn.benibix.com/compare/web-server-vs-application-server): People think a web server and an app server are the same program, and they are not. A web server takes every request and sends plain files, like images, by itself. An app server runs your code to build each answer from the data. Most sites run both, with the web server in front. Small sites can use one program for both jobs, which blurs the line.

![A browser on the left sends a request to a web server such as Nginx or Apache. The web server reads plain files straight from its document root folder, and passes every other request to an application server, which reads a database. Each request also adds one line to an access log file.](https://learn.benibix.com/diagrams/inf2-web-server.svg)

---

Source: https://learn.benibix.com/term/infrastructure/web-server
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
