August 16, 2022 . 3 MIN READ
sudo ufw enable
sudo ufw allow OpenSSH
sudo ufw allow http
sudo ufw allow https
sudo ufw allow 7080/tcp
sudo ufw allow 8088/tcp
sudo apt update
sudo apt install openlitespeed
Start and enable the service:
Check version and port:
Find:
Replace with:
Restart service:
Verify:
Login:
Create database and user:
Set admin password:
Access panel:
Go to Server Configuration → External App
Add new LiteSpeed SAPI App with:
Name: lsphp74
Address: uds://tmp/lshttpd/lsphp.sock
Command: lsphp74/bin/lsphp
Max Connections: 35
Environment:
Save and go to Script Handler
Update handler to use lsphp74
Restart server (Graceful Restart)
Test:
sudo usermod -aG www-data example
sudo groupadd wwwexample
sudo usermod -aG wwwexample example
sudo usermod -aG wwwexample www-data
sudo usermod -aG wwwexample nobody
Set ownership:
Set permissions:
Edit SSH config:
Add:
Restart SSH:
Generate certificate:
Or standalone:
Restart OpenLiteSpeed after major changes:
Ensure correct file ownership and permissions.
Keep your system and packages updated regularly.
Reference:
https://www.fcgid.com/how-to-install-openlitespeed-on-ubuntu-20-04-lts-focal-fossa/
https://www.howtoforge.com/tutorial/how-to-install-and-configure-openlitespeed-server-along-with-mariadb-and-php-on-ubuntu-2004/
https://www.secureserverlk.com/install-and-configure-openlitespeed-web-server/
https://upcloud.com/community/tutorials/install-openlitespeed-fast-secure-web-server/
https://itechzo.com/how-to-install-and-configure-openlitespeed-server-along-with-mariadb-and-php-on-ubuntu-20-04/