What Does a Web Server Do From Request to Response?
A web server is software that listens on ports 80 and 443, accepts HTTP requests from browsers, and returns the file or generated page that was asked for. Apache, Nginx, LiteSpeed and IIS are the common engines. It answers every request with content or a status code such as 404.
The role is narrower than the name suggests. The server accepts the connection, reads the Host header to decide which site was requested, then either returns a file from that site's document root or passes the request to a runtime such as PHP-FPM. It does not build your pages and it does not hold your database.
- Listens on port 80 for HTTP and 443 for HTTPS, and can answer on both at once.
- Serves static files straight from disk and hands dynamic requests to PHP-FPM or an application process.
- Maps one IP address to many sites through virtual hosts and the Host header.
- Returns a status code with every response, including 404 when the file does not exist.
- Writes each request to an access log, which is where you diagnose 500 and 403 errors.
On shared hosting the provider runs this layer for you, which is why a cPanel account has no Apache config to edit. The shared hosting page covers what you do control.
What Happens Between the Request and the Response?
A page load is a short chain: DNS resolves the domain to an IP address, the browser opens a TCP connection and negotiates TLS, then sends an HTTP request with a method, path and Host header. The server matches the host to a virtual host, finds or generates the response, and returns status, headers and body.
- DNS: the domain resolves to the server's IP address and is cached for its TTL.
- Connection: TCP handshake, then TLS for HTTPS; HTTP/2 and HTTP/3 reuse one connection for many files.
- Request: the browser sends GET /page with headers such as Host, Accept and Cookie.
- Work: a static file is read from disk; a dynamic page runs through PHP-FPM, which may query a database.
- Response: status, headers and body, after which the browser parses HTML and requests CSS, JS and images.
The costly parts are usually the database queries and the TLS handshake, not the file read. Caching the generated HTML at the server or the edge removes most of that work, as what a CDN adds explains.
How Do Apache, Nginx and LiteSpeed Differ?
They differ in how they handle concurrent connections, where configuration lives, and what each is best at. Apache is the compatibility default, Nginx is the event-driven front end, LiteSpeed is an Apache-compatible drop-in built for PHP, and IIS is the Windows option.
| Server | Connection handling | Configuration | Strongest fit |
|---|---|---|---|
| Apache HTTP Server | Process or thread per connection | Per-directory .htaccess plus httpd.conf | Broad compatibility and per-site overrides on shared hosting |
| Nginx | Event-driven, few worker processes | Central server blocks, no .htaccess | Static files, TLS termination and proxying to PHP-FPM |
| LiteSpeed | Event-driven | Reads Apache .htaccess, plus an admin console | WordPress and PHP sites that want Apache rules with fewer workers per connection |
| Microsoft IIS | Thread-based worker processes | web.config plus IIS Manager | ASP.NET and Windows-only applications |
Many cPanel servers run Nginx in front of Apache: Nginx terminates TLS and serves static files, Apache handles .htaccess and PHP. LiteSpeed replaces Apache in that stack and reads the same rules, which is why a site can move between them without rewriting its configuration.
Static vs Dynamic Content and PHP-FPM
A static file is sent as it sits on disk. A dynamic page is built per request by a runtime, and on Linux that runtime is usually PHP-FPM, a pool of PHP worker processes the web server talks to over a socket.
PHP-FPM pools have a fixed number of workers. When every worker is busy, new requests queue and then fail, which is the usual cause of a 503 on a busy WordPress site while the CPU graph still looks calm. Raise the pool or cache the pages; adding RAM without changing either does little.
Static assets should be served by the web server or the CDN, never by PHP. A theme that routes images through a PHP script costs one worker per image and is one of the easiest speed wins to fix.
What Are Ports, Virtual Hosts and a Dedicated Web Server?
Port 80 carries HTTP and 443 carries HTTPS. A virtual host is the rule that maps a domain to a folder on a shared IP: the browser sends the domain in the Host header, and on HTTPS the SNI field names it before the certificate is chosen.
A dedicated web server means the whole machine serves one customer, with its own IP, its own web server configuration and no neighbour competing for workers. A VPS is the same idea on virtualised CPU and RAM. Shared hosting puts many accounts behind one web server process, which costs less and leaves the tuning to the host.
Linux web server hosting means Apache, Nginx or LiteSpeed on Linux, managed through cPanel or SSH. Windows hosting means IIS and usually ASP.NET; the two stacks are not interchangeable at the configuration level.
Where Does the Web Server Sit in Your Hosting Stack?
It sits directly behind the network and in front of your code: TLS, the site files, PHP and the database are all reached through it. The hosting type decides how much of that stack you can change.
- Shared hosting: the host runs Apache or LiteSpeed, and you get cPanel, databases and email. You can change .htaccess and the PHP version, not the server itself.
- VPS: you get root, so you install and patch the web server, PHP-FPM and TLS yourself, or pay for it to be managed.
- Dedicated server: a whole machine for one account, with its own IP and full configuration control.
WebJi® sells all three, so the question is who tunes the server rather than what the word means. A brochure site does not need root; a site pushing heavy PHP concurrency usually does, and the VPS hosting and dedicated server pages carry the current figures.
Why Does Your Host's Web Server Choice Matter?
It sets your ceiling on concurrency, HTTP version, caching and PHP version. Two hosts can sell the same disk and RAM while one runs an older Apache with mod_php and the other runs LiteSpeed with HTTP/3 and page caching; on the same traffic, the second feels faster.
Ask four questions before you buy: which web server and version, whether HTTP/2 or HTTP/3 is on, which PHP versions you can select, and what the entry-process or concurrent-connection limit is. Those answers decide more than the storage number on the plan card.
Frequently Asked Questions
What is a web server in simple words?
Software on a computer that stores a website's files and answers browser requests for them, returning the page or an error code over HTTP.
What is the difference between a server and a web server?
A server is any computer that provides a service; a web server is the software, and loosely the machine, that answers HTTP requests. One physical server can run a web server, a database and a mail server at the same time.
Does a web server store the website's files?
Yes for static files such as HTML, CSS, images and fonts. Dynamic pages are generated by PHP or another runtime, and the content usually sits in a database that the runtime queries.
Which is faster, Apache, Nginx or LiteSpeed?
It depends on the workload. Nginx and LiteSpeed hold many connections with fewer workers, so they usually need less memory under concurrency, while Apache with .htaccess is easier to configure per site. The only number that matters is a measurement on your own traffic.
Which ports does a web server use?
Port 80 for HTTP and 443 for HTTPS by default. Both can be changed, but browsers assume those ports unless the URL names another.
What is a dedicated web server?
A server whose entire web server process serves one customer, with its own IP and configuration. It differs from a VPS in that the hardware is not shared, and from shared hosting in that no other account sits behind the same process.
What is Linux web server hosting?
Hosting where Apache, Nginx or LiteSpeed runs on Linux and is managed through cPanel or SSH. It is the usual stack for WordPress and PHP; Windows hosting uses IIS instead.

