What is LiteSpeed?
LightSpeed Web Server (LSWS) is proprietary web server software. According to Wikipedia, it is the 4th most popular web server, estimated to be used by 10% of websites as of July 2021.
LSWS Has been developed by LightSpeed Technologies and uses the same configuration format as the Apache HTTP Server. It is compatible with most Apache features. An open-source variant is also available.
It offers a broad range of features, including cPanel and WHM compatibility.
According to LiteSpeed Tech support, the installation process should take around 20 minutes.
The prerequisites are a server running Linux, with an operation cPanel installation. You will also need to purchase a LightSpeed license You can trial LightSpeed by purchasing a trial license.
To install LightSpeed on a Linux platform:
Install LSWS WHM Plugin, by running the following from ssh as root:
- Cd /usr/src;
- Curl https://www.litespeedtech.com/packages/cpanel/lsws_whm_plugin_install.sh | sh
Install LSWS from within WHM
- Click the “LiteSpeed Web Server” plugin. (In the “Plugins” section at the bottom of the scroll menu)
- Click “Install LiteSpeed Web Server”
- Fill in the form to specify
- Trial license key or serial number
- LiteSpeed target installation directory
- Port Offset (set to 0 to replace Apache otherwise set a number like “2000” for example to try LiteSpeed on port 2080)
- Whether to enable PHP SuEXEC
- Your Administrators email address.
- Username and password for LWSW WebAdmin Console
- Click “Next” to install LightSpeed
The next step depends on whether you have PHP 3 or 4. PHP4 is better because LSWS has a pre-built PHP4 binary. An upgrade, if possible is beneficial.
- For EA4, no further action is needed, the installation script will configure PHP automatically.
- For EA3, the process is more complicated and will take some time. Just click “Build Matching LSPHP”.
- You may receive errors. If so, try Increasing the maximum cPanel process memory.
- Then “/usr/local/cpanel/whostmgr/cgi/lsws/cmd_buildmatchingphp.sh”
Restart LSWS by clicking Restart LiteSpeed
You can now verify if everything is working as expected.
You can now replace Apache with LSWS. Click “Change Port Offset” and set the value to 0 if you had not done so previously. Click “Switch to LiteSpeed” and that’s it!
WARNING: Do NOT uncheck the “Apache Web Server” (httpd) service under WHM’s service manager. If you do this WHM will not restart LiteSpeed automatically when configuration changes have been made.
At the end of the trial period, you might want to uninstall LSWS, and return to Apache. This is quite simple:
From ssh as root type /usr/local/Cpanel/whostmgr/docroot/cgi/lsws/lsws_whm_plugin_uninstall.sh