New format
Web server: what it is, how it works, and Apache vs Nginx vs IIS
A web server takes a browser request and returns a page, file, or error. It’s both software (Apache, Nginx, IIS) and the machine or cloud where it runs.
Below: how it works, what makes up the “domain → server → site” chain, and what to watch when picking a stack — without nostalgia for outdated local packages.
In plain words
Library analogy: the reader (browser) asks for a book (URL); the librarian (web server) finds the material in storage and hands it over. Unlike one book checked out, a site can be “read” by thousands at once.
A sysadmin will say “hardware and network”; a developer — “software that serves HTTP.” Both are right.
Jobs and functions
The server accepts requests, may run a backend (PHP, Node, Python…), returns HTML/files, writes logs, can restrict access, and serve related roles (static delivery, proxy).
Typical loop:
- accept the request
- find the resource or build a response via the app
- return status and response body
- log the hit
- with HTTPS — keep an encrypted channel
How a request flows
The user types an address or clicks a link. DNS turns the name into an IP. The browser sends an HTTPS request. The server handles it and returns a page or an error code (404, 500…).
For a site to open you need:
- hosting or a server with enough resources
- web server software
- a domain and DNS record
- site files / an application
- an HTTPS certificate (usually via Let’s Encrypt or the hosting panel)
Apache, Nginx, IIS
Apache — shared-hosting classic, modularity, familiar .htaccess. Nginx — strong on static and as a reverse proxy. IIS — Windows Server ecosystem.
In practice:
- small site on hosting — often Apache or Nginx out of the box from the panel
- high load / microservices — Nginx (or analogue) in front of the app
- corporate Windows stack — IIS
Rough cheat sheet
| Software | Strengths | Where you often see it |
|---|---|---|
| Apache | Flexibility, .htaccess | Shared hosting, CMS |
| Nginx | Static, proxy, load | Prod, CDN setups |
| IIS | Windows integration | Corporate .NET environments |
Local stacks for development
OpenServer, XAMPP and similar packs suit beginners. Denver is long outdated — don’t aim at it in the 2020s. Teams more often use Docker or built-in framework environments.
Local is for breaking and fixing the site safely — not to replace production hosting.
Minimum to start:
- PHP/Node + DB per project needs
- HTTPS in prod (locally — as needed)
- matching major versions with prod when possible
Link to SEO and site availability
If the server returns 5xx, blocks bots, or slows TTFB, both people and indexing suffer. After a host change check response codes, redirects, and HTTPS.
After a move:
- home and key URLs return 200
- www/non-www and http→https are consistent
- sitemap and robots are reachable
- no mass 404s on old paths
FAQ
Is a web server a computer or a program?
Both meanings are alive: software that answers HTTP(S) requests, and the server environment (VPS/dedicated/cloud) where that software runs.
How does Apache differ from Nginx?
Both serve sites. Nginx is often a fast front (static, proxy); Apache is flexible and familiar on many shared hosts. In practice they’re often combined.
Why HTTPS?
It encrypts traffic between browser and server. Today it’s a baseline standard, plus a requirement of many browsers and search engines.
Does a small site need its own server?
Usually no: hosting/VPS from a provider is enough. Your own hardware makes sense for special loads and admin competence.
What is a local server for development?
An environment on your PC (Docker, OpenServer, XAMPP and analogues) to run the site without deploying to production.
Need a hosting and uptime audit?
We’ll check server responses, HTTPS, and bottlenecks — so tech doesn’t eat SEO and ads.
Discuss the task