Introduction
OpenLiteSpeed is a high-performance, lightweight, open source HTTP server developed and copyrighted by LiteSpeed Technologies. Users are free to download, use, distribute, and modify OpenLiteSpeed and its source code in accordance with the precepts of the GPLv3 license.
Prerequistes
- Ubuntu 22.04 server with sudo enabled.
- Enabled firewall
sudo ufw enable
Step 1 – Installing OpenSpeedLite
sudo apt update
sudo apt upgrade
Now enable the repository
sudo wget -O - https://repo.litespeed.sh | sudo bash
sudo apt update
sudo apt install openlitespeed lsphp81
This command installs the Openlitespeed server package and LSPHP 8.1. LiteSpeed PHP (LSPHP) is a PHP interpreter integrated with the LiteSpeed Server Application Programming Interface (LSAPI).
Step 2 – Settiing Administrative Password
sudo /usr/local/lsws/admin/misc/admpass.sh
default username admin
Put in the administrative password you prefer, then press ENTER
again. The script will confirm a successful update:
You have now secured the admin account.
Step 3 – Connecting to Server
sudo systemctl status lsws
If your server is not running, you can start the server using systemctl
sudo systemctl start lsws
Open ports on firewall, using ufw
command:
sudo ufw allow 8088,7080,443,80/tcp
http://server_domain_or_IP:8088
Output
Now move on to the administrative interface, In your web browser, navigate to server’s domain name or IP address using HTTPS and followed by :7080
to specify the port:
https://server_domain_or_IP:7080
Now enter the administrative username and password that you selected with the admpass.sh
script in the previous step:
After authentication we can see OpenLiteSpeed administration interface:
Step 4 – Changing port for default page
First change the default used port from 8088
to the conventional HTTP port (80
).
DO this using pressing Listeners in the list of options on side navigation bar. A list of all available listeners will load. From this list, click the magnifying glass, which is the View button, for the Default listener:
In Default listener click the edit button (the pen and paper symbol) in the top-right corner of the Address Settings table to modify its values. This button will open a new screen. Change port 8088
to port 80
, then click the Save button.
If you are prompted to restart LiteSpeed, press the Go button.
Finale
OpenLiteSpeed and PHP installed and running on an Ubuntu 22.04 server. OpenLiteSpeed offers great performance, a web-based configuration interface, and pre-configured options for script handling.