Everyone expect fast websites.
Here comes the role of “LiteSpeed Web Server cPanel” which simultaneously double the server speed and reduce the server load by half.
That’s why, we often get requests from customers to install LiteSpeed web server on cPanel servers as part of our Technical Support Services.
Today, we will see how our Support Engineers install LiteSpeed Web Server on cPanel servers and fix related issues.
What is LiteSpeed web server?
The LiteSpeed Web Server is a substitute to the traditional Apache Web Server. It seems identical to Apache, but with incredible improvements in performance. In addition, “LiteSpeed Web Server” is commonly used with control panels like cPanel.
LSWS (LiteSpeed Web Server) is an event-driven HTTP server with a convenient plugin for cPanel & WHM users. This plugin allows users access to LSWS functionality within the WHM user interface.
Install LiteSpeed WHM plugin
Let’s see how our Technical Team installed LiteSpeed WHM plugin on the server.
We installed LiteSpeed WHM plugin by running the following commands from ssh as root.
After running this command LiteSpeed Web Server plugin will appear in the WHM interface.
How we Install LiteSpeed Web Server from within WHM
We already setup the plugin. Now, its time to see how our Support Engineers Installed LiteSpeed Web Server from within WHM.
- We clicked the “LiteSpeed Web Server” plugin.
- Then clicked on “Install LiteSpeed Web Server”.
- Again, we configured the following values as per the customer’s settings:
- Trial license key or serial number
- LiteSpeed target installation directory
- Port Offset (set to 0 to replace Apache otherwise set a number like “3000” for example to try LiteSpeed on port 3080)
- Whether to enable PHP SuEXEC
- Administrators email address.
- Username and password for LWSW WebAdmin Console
- We clicked “Next” to install LiteSpeed.
- LiteSpeed is now installed on the server. Now we selected “Build Matching PHP Binary“.
- To select LiteSpeed as a web server, we clicked “Switch to LiteSpeed“.
- Then we restarted LiteSpeed.
- To integrate LiteSpeed with cPanel we logged into the admin area at http://your_server_ip:7080.
- We selected Configurations >> Server >> General.
- Scroll down to “Using Apache Configuration File”, then we clicked on edit and made the changes specified as in the below.
- Now we selected “Index Files” on the same screen and set it as Index File: index.html, index.php, index.php5, index.ph4, index.htm and saved it.
- Again, we selected .htaccess on the same screen, clicked on edit and put a checkmark for “Limit, Auth, Fileinfo, Indexes, Options.” Once done we clicked on save and then click on Back.
- Now we selected Configurations >> Server >> Listeners and deleted all current listeners.
- Finally, we restarted the LiteSpeed Web Server with the command “service lsws restart” from SSH.
How we fixed related issues in LiteSpeed web server cPanel?
From our experience in managing servers, we often see customers experiencing tough problems while installing LiteSpeed web server on cPanel. Now, Let’s see how our Support Engineers solved such problems.
1. Missing PHP module support
Recently, one of our customers came with a website issue after switching to LiteSpeed. He was getting the following error:
Here, the problem happened as the specific PHP version support was missing in the LiteSpeed server. Therefore, our Technical Team took the following steps to solve the issue.
- Firstly, we checked the website error log “/usr/local/lsws/logs/error_log” for the detailed reason of this error.
- We found that an entry for PHP72 was missing in the LSWS configuration.
- So, we simply created an external application and Script handlers for PHP 7.2.
That fixed the problem and websites started working.
2. LiteSpeed Does Not Restart
Similarly, another customer came with an issue as “LiteSpeed is not working”. Our Support Engineers used the following steps to troubleshoot the issue.
- Firstly, we checked the web server log file for the reason of this error.
- We identified that the issue was related to auto restart options for LiteSpeed web server. It was disabled in WHM > Service Configuration > Service Manager. In order to reflect changes in configuration settings, LiteSpeed Web Server should be restarted automatically.
- Therefore, we enabled “httpd” service in Service Manager, so that it gets restarted automatically.
And, that solved the error.[Having trouble while installing LiteSpeed web server on cPanel servers? We can fix it for you.]
In short, “LiteSpeed Web Server cPanel” is an Apache alternative and helps to increase performance, security, compatibility, or convenience. Today, we saw how our Support Engineers integrate LiteSpeed with cPanel server and fix the related issues.