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.
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.
cd /usr/src; curl https://www.litespeedtech.com/packages/cpanel/lsws_whm_plugin_install.sh | sh
After running this command LiteSpeed Web Server plugin will appear in the WHM interface.
1. We clicked the “LiteSpeed Web Server” plugin.
2. 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 “2000” for example to try LiteSpeed on port 2080)
- Whether to enable PHP SuEXEC
- Administrators email address.
- Username and password for LWSW WebAdmin Console
4. We clicked “Next” to install LiteSpeed.
5. LiteSpeed is now installed on the server. Now we selected “Build Matching PHP Binary“.
6. To select LiteSpeed as a web server, we clicked ‘Switch to LiteSpeed.
7. Then we restarted LiteSpeed.
8. To integrate LiteSpeed with cPanel we logged into the admin area at http://yourserverip:7080.
9. We selected Configurations >> Server >> General.
10. Scroll down to “Using Apache Configuration File”, then we clicked on edit and made the changes specified as in the below.
11. 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.
12. 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.
13. Now we selected configurations >> Server >> Listeners and deleted all current listeners.
14. 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:
"403 Forbidden Access to this resource on the server is denied!"
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.
1. Firstly, we checked the website error log “/usr/local/lsws/logs/error_log” for the detailed reason of this error.
2. We found that an entry for PHP72 was missing in the LSWS configuration.
3. So, we simply created an external application and Script handlers for PHP 7.2.
That fixed the problem and websites started working.
Similarly, another customer came with an issue as “LiteSpeed is not working”. Our Support Engineers used the following steps to troubleshoot the issue.
1. Firstly, we checked the web server log file for the reason of this error.
2. 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.
3. 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.