-->

There are different web servers, each with their pros and cons. For a long time Apache was king but it nowadays has serious competition from Nginx. Another popular choice is LiteSpeed, which is a drop-in replacement for Apache. On the Windows side you got IIS.

The main benefits of LiteSpeed are that it is light-weight and fast (the clue is in the name!). You can get a similar performance with Apache but it requires various tweaks. LiteSpeed is less configurable than Apache but the defaults are designed for speed, without compromising on stability and security.

cPanel Server Information

We use LiteSpeed on all our Linux shared and premium hosting plans. Unfortunately, the Server Information page in cPanel doesn’t tell you if your server is running Apache or LiteSpeed. Or rather, it always tells you that the server is running Apache, even if it is running LiteSpeed. For instance, here is the server information for my example.com website on our Acai server:

The 'Server Information' page in cPanel gives you various bits of information about the server configuration. Unfortunately it does not tell you if your server is running LiteSpeed.
cPanel’s Server Information page.

Note that the page shows that the server is Apache 2.4.51. That is the Apache version on the server, but LiteSpeed is used as a drop-in replacement. Unfortunately, that information is not included on the page. And as an aside, the page also shows that the PHP version is 5.6.40. That is only the inherited PHP version on the server and not necessarily the PHP version your website uses. You can check the actual PHP version via cPanel’s MultiPHP Manager.

How to check if LiteSpeed is used

There are a few different ways to check if your website is powered by LiteSpeed. The first is to look at the response headers the server sends when a page or resource is requested. The header that shows the web server software is server.

For instance, the below image shows the Network tab in my browser’s developer tools. I have selected the first resource (the main document), and in the right-hand pane you can see the response headers for the resource. The response headers are sent by the browser to a client, and they include various bits of information about the server. One of the headers is server, and it confirms the server is running LiteSpeed.

The response headers the server sends to web browsers confirms the web server software. Here, the 'Server' header shows 'LiteSpeed'.
The response headers.

In both Chromium-based browsers and Firefox you can get the information as follows:

  • Right-click on a page you want to check and select Inspect from the context menu.
  • Select the Network tab in your browser’s developer tools.
  • Refresh the web page to reload all resources for the page.

Alternatively, if you got access to the command line then you can use curl to print the headers. The -I (--head) option fetches the headers only, without downloading the page. You can optionally add the -L (--location) option to follows any redirects, such as a redirect from HTTP to HTTPS.

$ curl -I example.com
HTTP/1.1 200 OK
Connection: Keep-Alive
Keep-Alive: timeout=5, max=100
content-type: text/html; charset=UTF-8
link: <http://example.com/wp-json/>; rel="https://api.w.org/"
date: Tue, 20 Oct 2021 11:40:43 GMT
server: LiteSpeed

Check the server using PHP

You can also use a server-side language such as PHP to get information about the web server. If you just want to know what server software is running then you can you use the $_SERVER array. This snippet prints just the name of the server software (i.e. Apache, LiteSpeed or Nginx):

<?php echo $_SERVER['SERVER_SOFTWARE']; ?>

And of course you can also use the phpinfo() function:

<?php phpinfo(); ?>

The latter code snippet prints loads of information. Do a search for “Server API” – it should give you both the web server software and the version.