Skip to content
Getting Digital

Web Server

Also: HTTP server, nginx, Apache HTTP Server

A web server is the program listening on a network port for HTTP requests and answering them, either by returning a file from disk or by handing the request to application code behind it.

Our take. For a site of ordinary size the nginx-versus-Apache debate is close to decorative: caching, compression and TLS settings decide what a visitor feels, and an attentively configured Apache will beat an untouched nginx every time. The process model only starts to matter once you are holding enough simultaneous connections to notice it.

A web server is software, even though nearly everyone also uses the phrase for the machine. Strictly, it is a program bound to ports 80 and 443 that speaks HTTP: it accepts a request, works out which site and which path are being asked for, and returns a status code with a body. The hardware underneath is incidental, and a single virtual server will happily run one web server program answering for dozens of unrelated domains through name-based virtual hosts. Most real deployments chain two layers. At the front the web server does what it is genuinely excellent at: terminating the encrypted session, negotiating HTTP/2, reading static assets straight off disk, compressing responses, applying rate limits and rewriting paths. Anything dynamic is passed backwards over a socket to a separate process, PHP-FPM or a Node service or a pool of Python workers, whose output is passed back out to the visitor. That second role explains why nginx is so routinely described as a reverse proxy: it acts for the machines behind it rather than for the client in front of it. Which is why the choice people imagine they are making is usually not exclusive at all. Plenty of stacks run nginx at the front with Apache behind it, the first holding connections and certificates, the second honouring the per-directory rules an application expects, and neither one being the web server in any useful sense. The settings that decide what a visitor feels sit on whichever program is doing that part of the job, and they cost nothing to switch on: compression left off sends every page at full size, missing cache headers make returning visitors download assets they already hold, HTTP/2 unnegotiated puts requests back into single file, and an upload limit inherited from a default refuses an ordinary attachment. Misconfiguration gets expensive faster than that, too. A rule that hands out .env or the .git directory as plain text gives away credentials and the whole history of the codebase in one request, and a browsable directory publishes a folder nobody meant to share. Every item there is a line of configuration rather than an argument for changing product. It is also the first place to look when things break, because the access log holds every request alongside the response it received: a wall of gateway errors means the application process behind died or never started, while a wall of not-found responses means the rewrite rules did. The identical arrangement is running on shared hosting, assembled by somebody else, where the only part you can usually touch is a file of .htaccess rules.

Which program, and what for

ServerUsually picked forThe catch
nginxEncryption, static files and proxying to application processesNo per-directory overrides; changes mean editing central config
Apache HTTP ServerShared hosting and older stacks, on the strength of .htaccess and its modulesPer-directory lookups and a heavier cost per request
CaddySmall deployments that want certificates obtained and renewed unattendedYounger ecosystem, so fewer answers when something odd happens
LiteSpeed / OpenLiteSpeedApache-compatible rules plus built-in page caching, common at WordPress hostsThe full build is commercial and the open one is not its equal

In practice

A typical WordPress front end, described end to end: nginx holds 443 with a Let's Encrypt certificate, answers requests for uploaded images and CSS directly from the filesystem without ever waking PHP, and forwards everything else to PHP-FPM through a unix socket. PHP renders the page, hands it back, and nginx compresses it on the way out. Replace WordPress with a Node application listening on localhost and the shape is unchanged, which is why the pattern survives every fashion in application frameworks. Caddy would collapse the certificate half of that into two lines of configuration; Apache would do the same work with mod_proxy_fcgi and give the site owner .htaccess overrides in the bargain.

Often confused with

VPS (Virtual Private Server)
The VPS is the machine you rent; the web server is one program running on it, and the two are counted separately in every direction.
CDN (Content Delivery Network)
A CDN keeps copies of your responses near the visitor, whereas the web server is the origin that produced those responses to begin with.

Key takeaways

  • →It is a program rather than a box: the HTTP listener in front of your site, distinct from the hardware it happens to occupy.
  • →The dominant pattern is a front layer handling encryption, static files and routing, with dynamic work proxied to application processes behind.

Related concepts

  • Shared hosting is one web server fronting many tenants — the mechanism behind the model.

  • The same software fills both roles: a load balancer is a reverse proxy with multiple backends.

  • RelatedSSL/TLS

    TLS terminates at the web server (or CDN edge) — where certificates get configured.

Certifications that test this

Vendor exams whose syllabus covers this concept — facts, cost and a preparation path on each page.

More courses from these shelves

A rotating selection from the course directory, drawn from the subcategories where this concept is taught rather than picked for it. Details, price and the provider link are on the course page.

Building RESTful APIs with Go

REST is an architectural style that tackles the challenges of building scalable web services. APIs provide the fabric t…

Udemy

Advanced React: Design System, Design Patterns, Performance

Learn to build React projects that stay up-to-date even before they're finished, and discover how to make React applica…

Udemy

AI Skills For Artists And Content Creators - Zero To Hero

Course Description:Artificial Intelligence is transforming how we work, create, and connect online -and those who under…

Udemy

MEAN Stack Angular Material Node. js Angular App [2025]

Build a fullsatck MEAN e-commerce Application. But what is a MEAN Stack ?Well MEAN stands for: MongoDB, Express, Angula…

Udemy

Google Gemini Masterclass: From Zero to Hero

Welcome to the Gemini Masterclass by Studyopedia.In this video course, learn about Gemini and its concepts. Gemini is a…

Udemy

FAQ

Do I ever get to choose one?
On shared and most managed plans, no. The provider settled that question, and your influence extends to an .htaccess file under Apache or a panel toggle. The decision becomes yours on a VPS or a dedicated machine, where installing and configuring it is simply part of the work.
Would switching to nginx make my site faster?
Seldom, because the web server is rarely the bottleneck. Slow queries, uncached pages, oversized images and a chatty plugin cost far more milliseconds than the listener does. Measure where the time actually goes before rebuilding the front layer.
Can one machine run two of them?
Yes, though only one process can hold a given port. The usual arrangement puts one in front on 443 and proxies to the other on an internal port, which is how people keep Apache and its rewrite rules while letting nginx handle the connections and certificates.

Sources

The primary text this definition rests on. Read it before you trust ours.

Last reviewed 14 September 2026 · Getting Digital