How to install OpenLiteSpeed on Ubuntu 20.04/19.10/19.04

OpenLiteSpeed (OLS) is one of the fastest web servers around and can support hundreds of thousands of concurrent connections. Its runs in Unix like systems and is built as an Apache drop in replacement. Its built for speed and security. Here, we will learn how to install OLS on Ubuntu versions 19 to 20 and do basic setup to get ourselves started with it.

To install OLS on Ubuntu 19.04, 19.10 and 20.04, follow the steps below:

1. Add Litespeed repository

mwabini@serv0-rawle:~$ wget -qO - https://rpms.litespeedtech.com/debian/lst_repo.gpg | sudo apt-key add -
mwabini@serv0-rawle:~$ sudo add-apt-repository 'deb http://rpms.litespeedtech.com/debian/ bionic main'

2. Install needed libzip4 dependency which is needed for these versions of Ubuntu. We need version >=1.0. This is a very important step.

mwabini@serv0-rawle:~$ wget -qO - http://archive.ubuntu.com/ubuntu/project/ubuntu-archive-keyring.gpg | sudo apt-key add -
mwabini@serv0-rawle:~$ sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu bionic main'
mwabini@serv0-rawle:~$ sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu bionic-updates main'
mwabini@serv0-rawle:~$ wget http://ftp.br.debian.org/debian/pool/main/libz/libzip/libzip4_1.5.1-4_amd64.deb
mwabini@serv0-rawle:~$ sudo dpkg -i libzip4_1.5.1-4_amd64.deb

3. Install lsphp which is needed to by OLS

mwabini@serv0-rawle:~$ sudo apt-get install lsphp73

4. Install Open Litespeed Webserver

mwabini@serv0-rawle:~$ sudo apt-get install openlitespeed

5. Start OLS

mwabini@serv0-rawle:~$ /usr/local/lsws/bin/lswsctrl start

You have now successfully installed OLS and have it running. Next we will go ahead and change some default settings

6. Change OLS web admin password. OLS normally sets this password to 123456 by default and you need to change this to something more secure. You can also change the admin username. To change username and password from default, run the command below.

mwabini@serv0-rawle:~$ sudo /usr/local/lsws/admin/misc/admpass.sh

You can then access the web admin dashboard by loading the link https://SERVER_IP:7080 on your browser.
Note: Please make sure port 7080 is allowed on your firewall for this to work

7. Change the default OLS http port to 80. By deafult, OLS uses port 8088 for http traffic. You may need to change this to the conventional port 80. To do this follow the steps below:

• Login to the web admin dashboard
• Go to Listeners then click View

  • Click Edit icon on your top right and change Port from 8088 to 80 then Save.
  • Restart OLS

Leave a Reply

Your email address will not be published. Required fields are marked *