Installation

This guide covers installation of 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 guide will only cover installing the Plesk Extension first, and then installing LSWS from the extension.

Prerequisites

  1. A working Plesk Apache server
  2. If you have an nginx reverse proxy, it must be stopped (covered below)

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 LiteSpeed Web Server, you must stop the nginx reverse proxy so that Apache is the only web server handling live traffic. Otherwise, the LiteSpeed process will be blocked from being started.

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

!nginx-error

To stop the 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.

After nginx has stopped , please verify that Apache has been switched to run on 80/443 ports, like so:

netstat -lnp | grep httpd or netstat -lnp | grep apache

If it has not , please execute the plesk repair web command to rebuild the Apache configuration file.

Install The LiteSpeed Plesk Extension

  1. Download the latest Plesk extension from our website.

  2. Open /usr/local/psa/admin/conf/panel.ini for editing. If it doesn't exist, create it.

  3. Add the following content, and save the file:

    [ext-catalog]
    extensionUpload = true
    

  4. In Plesk, navigate to Extensions > My Extensions, as seen in the screenshot below. Click the Upload Extension button, and upload the package that was downloaded in step 1.

!

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.

!install1

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

!install2

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 by 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.

!install3

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

!install4

Click Okay at the bottom of the page and start LSWS by clicking Restart LiteSpeed.

!install5

If successful, you should now see a message on your LiteSpeed Extension page letting you know that both LiteSpeed and Apache are running on different ports. Apache will be running on the regular port 80, while LiteSpeed will be running on 1080, assuming your port offest is 1000.

!install6

For a staging server or test environment, there is no need to test LiteSpeed on an offset port. Also for some applications, such as WordPress and Magento, LiteSpeed cannot be tested on an offset port. For those cases, you can simply "Switch to LiteSpeed" from the extension GUI or command line for testing like so:

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

Testing 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 example, we have set the port offset to 1000. If we want to test any sites, we can do so on ports 1080 and 1443 for HTTP and SSL requests respectively.

!install7

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 LiteSpeed

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

!install8

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

!install9

Switching between LiteSpeed and Apache

Switching between LiteSpeed and Apache should be done through the LiteSpeed Extension.

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

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

Last update: April 17, 2020