Installing LSWS with Plesk 12.0 and up

This wiki covers how to install LiteSpeed Web Server (LSWS) and LiteSpeed's Plesk Extension on a Plesk server. We assume that you have a working Apache-Plesk setup. While there are multiple ways to go about the installation, this wiki will only cover installing the Plesk Extension first and then installing LSWS from the extension.

Prerequisites

  1. OS: Linux, CloudLinux, or RedHat
  2. A working Apache setup
  3. Plesk >= 12.0
  4. Stopped the Nginx Reverse Proxy (covered below)

Note: If using Plesk 11.5, please follow our Installing LSWS with Plesk 11.5 guide.

Stopping the Nginx Reverse Proxy

The latest version of Plesk may configure Nginx as a reverse proxy server that sits in between the Internet and Apache. Before installing LSWS, you must stop Nginx reverse proxy so that Apache is the only web server handling live traffic or the LiteSpeed process will be blocked from being started.

If Nginx reverse proxy is not currently stopped, you will encounter the following message when trying to access the LiteSpeed extension:

Stopping Nginx reverse proxy:

From the Plesk Admin Console, navigate to…

Server Management → Tools and Settings → Server Management → Services Management → Reverse Proxy Server (nginx)

…and click the stop button .

Install The LiteSpeed Plesk Extension

You can find and install our Plesk extension, listed as “LiteSpeed Extension 1.2.x”, through the Plesk Extension Catalog or litespeed website.

Server Management > Extensions > Extensions Catalog

The Plesk extension can also be downloaded from litespeed website to your local drive and uploaded through Plesk Admin Console→ Extentions → Add Extention → choose the downloaded file → ok

Install LSWS From The LiteSpeed Plesk Extension

You can now access the LiteSpeed Plesk Extension under Server Management > Extensions > LiteSpeed Extension.

Install LSWS

Click “Install LiteSpeed Web Server”.

After reading the License Agreement, check the “I agree” box and either input your license's serial number or request a trial license.

Scrolling down a little further will present you with “Installation Options” and “WebAdmin Console Login” sections.

The default values for the “Installation Options” section should be acceptable, though it is recommended that you set a non-zero “Port offset” , such as “1000”, for first time installations. “ Enable PHP SuEXEC” is recommended for shared hosting and selected as default. For the “WebAdmin Console Login” section, you are only required to enter a password, but it is recommended to use a username other than the default for security reasons.

When you're ready, click the “Install” button at the bottom.

Now, click “Okay” at the bottom of the page and start LSWS by clicking “Restart LiteSpeed”.

If successful, you should now a message similar to the following on your LiteSpeed Extension page: Both LiteSpeed and Apache are running with difference port. Apache is running on regular port 80,while LiteSpeed is running on “1080” if you set port offset as “1000”.

For staging server/test environment, there is no necessary to test LiteSpeed on offset port. Also for some applications, such as WordPress and Magento, can not be tested on offset port. For those cases, you can simply “Switch to LiteSpeed” from the extension GUI or command line for testing as:

  /usr/local/lsws/admin/misc/cp_switch_ws.sh lsws

Configure PHP for LSWS

Starting from Plesk 12.0, Plesk supports multiple versions of PHP through plesk-phpxx packages out of the box. The installation script will automatically do the necessary steps to get PHP configured for LiteSpeed. If you are still kean to see how Plesk PHP selector works, please refer to plesk php guide.

Test your sites with a port offset

The beauty of the port offset is that you can run LSWS and Apache in parallel. This means you can test out hosting your sites on LSWS to make sure they work before actually turning off Apache. In this setup, I have set the port offset to 1000. If I want to test any sites, I can do so on ports 1080 and 1443 for HTTP and SSL requests respectively.

Once you're confident that your sites are running correctly with LSWS, it's time to switch to LSWS as your main web server.

Switch to LSWS

Click “Switch to LiteSpeed”. This will stop Apache and switch LSWS to your main server ports — 80 and 443.

LiteSpeed is now running as your main web server. Congratulations!

LSWS Web Admin Console

LSWS Web Admin Console uses port 7088 instead of 7080 for Plesk. Check your firewall to see if port 7088 has been enabled, then you should be able to access it through http://IP:7088.

Switching between LiteSpeed and Apache

Switching between LiteSpeed and apache should be done through LiteSpeed Extension.

You can also do so by running switching script from command line:

/usr/local/lsws/admin/misc/cp_switch_ws.sh apache
/usr/local/lsws/admin/misc/cp_switch_ws.sh lsws    

Enable plesk watchdog web server monitoring services

Plesk control panel normally restarted web server when there is an Apache configuration change or at specified internal. If there is any configuration error, web server may not be able to restart after it stops. It is critical to enable Plesk control panel web server monitoring at all time to avoid the web server service accidental stop. Watchdog is an plesk extension with such functionality.

First, go to Extensions > My Extensions to check if Watchdog is installed in Plesk . If it is not, install the Watchdog system monitoring component (it is located under “Plesk extensions”). You can check here for installation instruction.

To Enable it, go to Extensions → Watchdog → Services → Web Server (Apache) and enable it. Although it said “Apache”, it will monitor LiteSpeed web server process as well and restart it when it is not running. Please refer to plesk documentation about Watchdog for details.

 
litespeed_wiki/plesk/installation-12.txt · Last modified: 2017/11/27 22:09 by Jackson Zhang