OpenLiteSpeed is a high-performance, lightweight, open source HTTP server edition of LiteSpeed Web Server Enterprise. Users are free to download, use, distribute, and modify OpenLiteSpeed and its source code in accordance with the precepts of the GPLv3 license. OpenLiteSpeed combines speed, security, scalability, optimization and simplicity in one friendly open-source package. Source: LiteSpeed Webpage

Features of LiteSpeed Web Server

Some of the top reasons why you should consider LiteSpeed include its features as follows:

  • Event-Driven Architecture: Fewer processes, less overhead, and enormous scalability
  • HTTP/3 & HTTP/2 Support: Serves your site with the latest internet protocols
  • mod_rewrite Compatible: Rewrite engine understands Apache rewrite rule syntax
  • Multiple PHP Support: Supports embedded PHP, LSAPI for 2x faster external apps
  • Friendly Admin Interfaces: Builtin WebAdmin GUI, CyberPanel, or DirectAdmin control panel
  • Built for Speed and Security: Anti-DDoS features, bandwidth throttling, WAF support, and more
  • Intelligent Cache Acceleration: Efficient, highly customizable full-page cache module
  • PageSpeed Optimization: Automatically implement Google’s PageSpeed optimization system
  • CMS Acceleration: WordPress, Drupal, Joomla and more: superior performance
  • ModSecurity Integration: mod_security v3 integration provides Layer-7 protection
  • One-Click Installation: Install OpenLiteSpeed, MariaDB, and WordPress in one click
  • Multi-Thread Module: The fastest web service platform using custom MT module

With such wealth of features, let us get OpenLiteSpeed installed on Ubuntu 20.04 and Debian 10.

Step 1: Add LiteSpeed Repository

The provided APT repository contains all the latest packaged for LiteSpeed. Add the repository to your Ubuntu | Debian system by running the following commands in your terminal.

wget -O - http://rpms.litespeedtech.com/debian/enable_lst_debian_repo.sh | sudo bash

Step 2: Install OpenLiteSpeed

With the repository added you can install OpenLiteSpeed web server on Ubuntu 20.04 | Debian 10 Linux machine using apt package manager.

You need to make sure APT list is updated before installation is done.

sudo apt update
sudo apt-get install openlitespeed

Step 3: Install PHP on Debian | Ubuntu

The commands below will install PHP 7.4 with all commonly-used packages for OpenLiteSpeed from LiteSpeed’s Debian Repo. Following the install, the soft link created will direct OpenLiteSpeed to use the installed PHP.

This build of PHP should be enough to support the most commonly used web applications. If you wish to install an older version such as PHP 5.6, replace lsphp74 to lsphp56.

sudo apt-get install lsphp74
sudo ln -sf /usr/local/lsws/lsphp74/bin/lsphp /usr/local/lsws/fcgi-bin/lsphp5

To start the server, we shall run /usr/local/lsws/bin/lswsctrl start and to stop it, we shall run /usr/local/lsws/bin/lswsctrl stop

$ sudo /usr/local/lsws/bin/lswsctrl start
[OK] Send SIGUSR1 to 94667

Step 4: Setting the Administrative Password

In order to login to the DirectAdmin control panel, we have to generate an Administrative Password. OpenLitespeed ships with a script to help us with this part. Simply run the command below

$ sudo /usr/local/lsws/admin/misc/admpass.sh

Please specify the user name of administrator.
This is the user name required to login the administration Web interface.

User name [admin]: Geeksadmin

Please specify the administrator's password.
This is the password required to login the administration Web interface.       

Password: 
Retype password: 
Administrator's username/password is updated successfully!

Running the above will ask you to provide a username. Pressing ENTER without choosing a new username defaults to admin as the new administrative username. Later, you will be prompted to create and confirm a new password for the account. Kindly provide the details then proceed to login.

Step 5: Access OpenLiteSpeed Web Admin on Ubuntu | Debian

As it had been touched on in the features, OpenLiteSpeed comes with friendly Admin Interfaces (Builtin WebAdmin GUI, CyberPanel, or DirectAdmin control panel). The default port that the WebAdmin console listens from is 7080. Point your browser to http://your-server-ip:7080 and you should get a login page as shown below. Enter the username and password you just created.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/07/echo/LiteSpeed-login-page-1.png" data-ez ezimgfmt="rs rscb8 src ng ngcb8 srcset" height="655" src="data:image/svg xml,” width=”906″>

And you should be ushered into a dashboard similar to the screenshot below

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/07/echo/LiteSpeed-dashboard-2-1024×526.png" data-ez ezimgfmt="rs rscb8 src ng ngcb8 srcset" height="471" src="data:image/svg xml,” width=”917″>

Step 6: Creating a Test Virtual Host on OpenLiteSpeed

From the interface, it is very easy to create a virtual host. Simply click on the “Virtual Hosts” tab and click on as illustrated below. You will be presented with a form where you will fill with details that correspond to your settings.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/07/echo/LiteSpeed-virtual-host-3-1024×523.png" data-ez ezimgfmt="rs rscb8 src ng ngcb8 srcset" height="474" src="data:image/svg xml,” width=”928″>

Fill in the form with the details corresponding to your desired configuration.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/07/echo/LiteSpeed-virtual-host-created-4-1024×532.png" data-ez ezimgfmt="rs rscb8 src ng ngcb8 srcset" height="487" src="data:image/svg xml,” width=”939″>

Let us create a sample php file in the Default Virtual Host directory to check of our webserver is working well. By default, the OpenLiteSpeed virtual host accepts connections on port 8088. If you point your browser to that port, you should see a page like below:

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/07/echo/LiteSpeed-virtual-host-port-8088-1024×526.png" data-ez ezimgfmt="rs rscb8 src ng ngcb8 srcset" height="482" src="data:image/svg xml,” width=”938″>

So to serve our test page, we will point our browser to http://your-server-ip:8088/file-name

Create a sample php test file

$ sudo vim /usr/local/lsws/Example/html/test.php



<?php
echo 'Sample PHP Script';
?>


        <?php
               echo '

This is to confirm that our PHP is working

'; ?>

OpenLiteSpeed

OpenLiteSpeed is a high-performance, lightweight, open source HTTP server edition of LiteSpeed Web Server Enterprise

Point our browser to http://your-server-ip:8088/test.php

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/07/echo/LiteSpeed-virtual-host-test-php-6.png" data-ez ezimgfmt="rs rscb8 src ng ngcb8 srcset" height="439" src="data:image/svg xml,” width=”877″>

And our webserver is in good shape!

Step 7: Change default Virtual Host Listening Port

If you are unhappy with the default port 8088 where Virtual Hosts listen for connections by default, you can change the value to the one you are comfortable with. Click on “Listeners” then on “View” as illustrated on the image below.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/07/echo/LiteSpeed-virtual-host-listeners-change-port-7-1024×518.png" data-ez ezimgfmt="rs rscb8 src ng ngcb8 srcset" height="463" src="data:image/svg xml,” width=”916″>

That will open the Listeners configuration page. On the page, click on the edit icon to alter with the defaults. The image below illustrates that.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/07/echo/LiteSpeed-virtual-host-listeners-change-port-8-1024×476.png" data-ez ezimgfmt="rs rscb8 src ng ngcb8 srcset" height="428" src="data:image/svg xml,” width=”922″>

Once editing has been enabled, you are free to choose the port of your choice. After you are done, save your configurations by clicking on the save icon as illustrated below.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/07/echo/LiteSpeed-virtual-host-listeners-change-port-9-1024×521.png" data-ez ezimgfmt="rs rscb8 src ng ngcb8 srcset" height="465" src="data:image/svg xml,” width=”915″>

As you may have guessed, openlitespeed webserver has to be restarted to create the new changes. Click on the grace restart button and you will be good to go.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/07/echo/LiteSpeed-virtual-host-listeners-change-port-restart-10-1024×469.png" data-ez ezimgfmt="rs rscb8 src ng ngcb8 srcset" height="419" src="data:image/svg xml,” width=”915″>

You can go ahead and test your file against the new port. Remember to allow the port on your firewall if you have one running.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/07/echo/LiteSpeed-virtual-host-listeners-change-port-new-port-page-11.png" data-ez ezimgfmt="rs rscb8 src ng ngcb8 srcset" height="466" src="data:image/svg xml,” width=”872″>

Concluding Remarks

There is so much that OpenLiteSpeed webserver can do. We have just covered the basics here. You can use it as a reverse proxy, host Joomla, Drupal, setup cache and much more. Kindly check out OpenLiteSpeed Configuration to find out a lot of things that OpenLiteSpeed can offer for your use.

Web Design courses:


<img alt="The Web Developer Bootcamp" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/07/echo/625204_436a_2.jpg5f2162c822d3d.jpg" ezimgfmt="rs rscb8 src ng ngcb8" src="data:image/svg xml,”>

<img data-ezsrc="https://kirelos.com/wp-content/uploads/2020/07/echo/icon_udemy-com.png5f2162c82af33.jpg" ezimgfmt="rs rscb8 src ng ngcb8" src="data:image/svg xml,”>Udemy.com


<img alt="The Complete 2020 Web Development Bootcamp" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/07/echo/1565838_e54e_11.jpg5f2162c89e08b.jpg" ezimgfmt="rs rscb8 src ng ngcb8" src="data:image/svg xml,”>

<img data-ezsrc="https://kirelos.com/wp-content/uploads/2020/07/echo/icon_udemy-com.png5f2162c82af33.jpg" ezimgfmt="rs rscb8 src ng ngcb8" src="data:image/svg xml,”>Udemy.com


<img alt="The Complete Web Developer Course 2.0" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/07/echo/764164_de03_2.jpg5f2162c8d4a73.jpg" ezimgfmt="rs rscb8 src ng ngcb8" src="data:image/svg xml,”>

<img data-ezsrc="https://kirelos.com/wp-content/uploads/2020/07/echo/icon_udemy-com.png5f2162c82af33.jpg" ezimgfmt="rs rscb8 src ng ngcb8" src="data:image/svg xml,”>Udemy.com

As you continue to navigate this difficult period, we wish you health, strength and determination to face it all. We appreciate you stopping by, your continued support and staying till the end. Other guides that will interest you include:

Install Nginx With PHP-FPM on Ubuntu

Install and Configure IIS Web Server on Windows Server

How To Configure Virtual Directory on Windows IIS Server

How to Install Webmin on RHEL 8 / CentOS 8