Install and configure LiteSpeed ​​web server on Ubuntu 20.04 | Debian 10

To
You can download this article in PDF format via the link below to support us.

Download the guide in PDF format

turn off
To

To
To

OpenLiteSpeed ​​is a high-performance, lightweight, open source HTTP server version of LiteSpeed ​​Web Server Enterprise. Users can freely download, use, distribute and modify OpenLiteSpeed ​​and its source code in accordance with the provisions of the GPLv3 license. OpenLiteSpeed ​​combines speed, security, scalability, optimization and simplicity in a friendly open source software package. Resources: LiteSpeed ​​page

Features of LiteSpeed ​​web server

Some important reasons you should consider using LiteSpeed ​​include its features, as follows:

  • Event-driven architecture: fewer processes, less overhead, and great scalability
  • HTTP/3 and HTTP/2 support: use the latest Internet protocols to provide services for your site
  • Mod_rewrite compatible: the rewrite engine understands Apache rewrite rule syntax
  • Multiple PHP support: support embedded PHP, LSAPI, and increase the speed of external applications by 2 times
  • Friendly management interface: built-in WebAdmin GUI, CyberPanel or DirectAdmin control panel
  • Designed for speed and security: Anti-DDoS function, bandwidth limitation, WAF support, etc.
  • Smart cache acceleration: efficient, highly customizable full-page cache module
  • PageSpeed ​​Optimization: Automatically implement Google’s PageSpeed ​​optimization system
  • CMS acceleration: WordPress, Drupal, Joomla, etc.: excellent performance
  • ModSecurity integration: mod_security v3 integration provides layer 7 protection
  • One-click installation: One-click installation of OpenLiteSpeed, MariaDB and WordPress
  • Multi-threaded module: the fastest web service platform using custom MT module

With such a wealth of features, let’s install OpenLiteSpeed ​​on Ubuntu 20.04 and Debian 10.

Step 1: Add the LiteSpeed ​​repository

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

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

Step 2: Install OpenLiteSpeed

After adding the repository, you can install the OpenLiteSpeed ​​web server on Ubuntu 20.04. Debian 10 Linux machine use Easy Parcel manager.

Before the installation is complete, you need to make sure that the APT list is updated.

sudo apt update
sudo apt-get install openlitespeed

Step 3: Install PHP on Debian | Ubuntu

The following command will install all the common OpenLiteSpeed ​​packages in PHP 7.4 and LiteSpeed’s Debian Repo. After installation, the soft link created will instruct OpenLiteSpeed ​​to use the installed PHP.

This PHP version should be sufficient to support the most commonly used web applications. If you wish to install an older version (such as PHP 5.6), please replace lsphp74 with 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 will run /usr/local/lsws/bin/lswsctrl Start And stop it, we will run /usr/local/lsws/bin/lswsctrl stop

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

Step 4: Set an administrative password

In order to log in to the DirectAdmin control panel, we must generate an administrative password. OpenLitespeed comes with a script to guide us in this part elegantly. Just run the following command and fill in the details when prompted.

$ 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 command will ask you to provide a username. Pressing the ENTER key without selecting a new user name will default to admin as the new management user name. Later, you will be prompted to create and confirm a new password for this account. Please provide details and continue to log in.

Step 5: Access OpenLiteSpeed ​​Web Admin on Ubuntu | Debian

As mentioned in the function, OpenLiteSpeed ​​comes with a friendly management interface (built-in WebAdmin GUI, CyberPanel or DirectAdmin control panel). The default port that the WebAdmin console listens to is 7080. Point your browser to http://your server-ip: 7080 Then you will get a login page as shown below. Enter the username and password you just created.

And you should enter a dashboard similar to the screenshot below

Install and configure LiteSpeed ​​web server on Ubuntu 20.04 | Debian 10

Step 6: Create a test virtual host on OpenLiteSpeed

Through the interface, it is very easy to create a virtual host. Just click “Virtual host“Tab and click + As shown below. The system will display a form where you will fill in the details corresponding to your settings.

Install and configure LiteSpeed ​​web server on Ubuntu 20.04 | Debian 10

Fill in the detailed information corresponding to the required configuration in the form.

Install and configure LiteSpeed ​​web server on Ubuntu 20.04 | Debian 10

Let’s create a sample php file in the default virtual host directory to check if our web server is running well. By default, the OpenLiteSpeed ​​virtual host accepts connections on port 8088. If you point your browser to this port, you should see the following page:

Install and configure LiteSpeed ​​web server on Ubuntu 20.04 | Debian 10

Therefore, in order to provide a test page, we point the browser to http://your server-ip:8088/file name

Create a sample php test file

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



Sample PHP Script';
?>


        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

Install and configure LiteSpeed ​​web server on Ubuntu 20.04 | Debian 10

And our web server is in good condition!

Step 7: Change the default virtual host listening port

If you are not satisfied with the default port 8088, the virtual host will listen for connections by default on the default port, you can change the value to your favorite port. Click on “audience“And then”view“,As shown below.

Install and configure LiteSpeed ​​web server on Ubuntu 20.04 | Debian 10

This will open the “Listener” configuration page. On the page, click the edit icon to change the default value. The figure below illustrates this.

Install and configure LiteSpeed ​​web server on Ubuntu 20.04 | Debian 10

After enabling editing, you can freely select the desired port. When finished, save the configuration by clicking the save icon as shown below.

Install and configure LiteSpeed ​​web server on Ubuntu 20.04 | Debian 10

As you may have guessed, the openlitespeed web server must be restarted to create new changes. Click the grace restart button and you will be able to use it normally.

Install and configure LiteSpeed ​​web server on Ubuntu 20.04 | Debian 10

You can continue to test the file with the new port. If it is running, remember to allow the port on the firewall.

Install and configure LiteSpeed ​​web server on Ubuntu 20.04 | Debian 10

Concluding remarks

The OpenLiteSpeed ​​web server can do many things. We have only introduced the basics here. You can use it as a reverse proxy, host Joomla, Drupal, set up caching, etc. Please check out OpenLiteSpeed ​​configuration Find out the many features OpenLiteSpeed ​​can provide you.

Web Design Course:


Web Developer Bootcamp

Web Developer Bootcamp

★★★★★
(177138)

$ 15.24

$175.86

In stock

Buy now

Install and configure LiteSpeed ​​web server on Ubuntu 20.04 | Debian 10Udemy.com


Complete 2020 Web Development Bootcamp

Complete 2020 Web Development Bootcamp

★★★★★
(74523)

$ 15.24

$175.86

In stock

Buy now

Install and configure LiteSpeed ​​web server on Ubuntu 20.04 | Debian 10Udemy.com


Complete Web Developer Course 2.0

Complete Web Developer Course 2.0

★★★★★
(61734)

$14.07

$164.14

In stock

Buy now

Install and configure LiteSpeed ​​web server on Ubuntu 20.04 | Debian 10Udemy.com

As you continue through this difficult time, we wish you health, strength and determination to face everything. Thank you for coming. We continue to support and stick to it. Other guides that may be of interest to 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

To
You can download this article in PDF format via the link below to support us.

Download the guide in PDF format

turn off
To

To
To

Sidebar