Skip to content
Web and HTTP2 min read

What is a web server?

Short answer

A web server is software running on a server that listens for HTTP and HTTPS requests. It sends static files like images and CSS directly, passes dynamic requests to PHP or another application, and returns the result to the visitor. The best-known web servers are Apache, Nginx and LiteSpeed.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. What happens when a page is requested
  2. The main web servers compared
  3. Example: finding out which web server a site uses
  4. Common misconceptions
  5. On ArabyHost

“Server” means two things: the machine, and the software serving websites on it. The web server is the software. One web server usually serves hundreds of sites on the same machine and tells them apart by the Host header in each request, an approach called virtual hosts.

What happens when a page is requested

  1. The request reaches the web server on port 443.
  2. It decrypts TLS and works out the site from the domain name.
  3. If the file is static, such as logo.png, it sends it straight back.
  4. If it’s dynamic, such as index.php, it hands it to PHP, waits for the output and sends that.
  5. It adds headers such as compression and cache lifetime, and logs the request.

The main web servers compared

Apache Nginx LiteSpeed
.htaccess files Supported Not supported Supported (Apache-compatible)
Architecture Processes or threads, depending on the MPM Event-driven Event-driven
Running PHP mod_php or PHP-FPM PHP-FPM LSAPI
Page caching Through add-on modules FastCGI cache Built-in LSCache

Example: finding out which web server a site uses

curl -sI https://example.com | grep -i '^server'
# server: LiteSpeed

Some sites hide this header, or show a proxy’s name such as cloudflare instead of the real server.

Common misconceptions

  • The web server isn’t the database: MySQL is a separate program, and the web server never talks to it directly, only through PHP or your app.
  • Switching servers won’t fix slow code: the server speeds up file delivery and caching, but heavy queries stay heavy.
  • A proxy isn’t the web server: services like Cloudflare sit in front of the web server, forward requests to it and cache some files, but they don’t run your site’s code.
  • Apache rules don’t work on Nginx: when moving a site from Apache to Nginx, .htaccess rules must be rewritten in Nginx’s configuration.

On ArabyHost

Every ArabyHost site runs on the LiteSpeed web server, which reads .htaccess files just like Apache, so WordPress and Laravel sites work with their usual settings. On WordPress sites, the LiteSpeed Cache plugin works directly with the server to cache pages, and a free SSL certificate is issued for every site automatically.

FAQ

What's the difference between a server and a web server?

The server is the machine or virtual machine itself; the web server is one program running on it alongside others like the database and the mail server. People use "server" for both in everyday speech.

Can you run more than one web server together?

Yes, and it's common. For example, Nginx sits in front as a reverse proxy and forwards requests to Apache or to a Node.js app behind it.

Does the web server affect site speed?

It affects how many visitors the server can handle at once and how fast it delivers files and cached pages. How fast a dynamic page is generated depends more on the code and the database.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.