Unix/Linux Guru and FOSS supporter

How to install OpenLitespeed server with php8 for Debain11/Ubuntu21

OpenLiteSpeed is an easy-to-use, open-source web server. It offers unbeatable features and performance to your sites along with top-notch security. The server understands all the apache rewrite rules and has intelligent cache acceleration features that let you implement the fastest caching on your server. In this tutorial, we will install & access the openlitespeed GUI. We have used 21.10 server

Install Openlightspeed

By default, OpenLiteSpeed is not included in the Ubuntu default repository, so you will need to add the OpenLiteSpeed repository to your server. You can add it using the following command:

wget -O - | bash

Once the repository is added, install OpenLiteSpeed with the following command:

sudo apt install openlitespeed -y

After the installation, start the OpenLiteSpeed service and enable it to start at system reboot:

sudo systemctl enable lshttpd
sudo systemctl start lshttpd

Next, verify the status of OpenLiteSpeed with the following command:

sudo systemctl status lshttpd

Check the version

/usr/local/lsws/bin/openlitespeed -v

You will get the following update

Now, open your web browser and type the URL https://openlitespeed.unixcop.local You should see the OpenLiteSpeed default page

Install PHP8.0

Install php8 using the following command

sudo apt install lsphp80 lsphp80-mysql lsphp80-common lsphp80-opcache lsphp80-curl -y

Once Installation done, check if it has installed successfully by checking the version

Run the following command

/usr/local/lsws/lsphp80/bin/php8.0 -v

You will get the following update

Also you can check the installed php version with the help of your web browser

go to this page http://openlitespeed.unixcop.local/phpinfo.php

Next, you will need to configure it to use PHP version 8.0.

You can do it by editing the httpd_config.conf file:

vim /usr/local/lsws/conf/httpd_config.conf

Find the following line:

  path                    lsphp73/bin/lsphp

Replaced it with the following line:

  path                    lsphp80/bin/lsphp

Save and close the file, then restart the LiteSpeed service to apply the changes:

sudo systemctl restart lsws

Create OpenLiteSpeed Admin User

Next, you will need to create an admin user to access the OpenLiteSpeed admin interface.

Run the following script to create an admin user:

sudo /usr/local/lsws/admin/misc/

You can now access the OpenLiteSpeed web interface using the URL https://openlitespeed.unixcop.local:7080/login.php. You should see the following page:

Login with the admin & password you have set.


Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook