- Requirements before installation
- Installing the LiteSpeed Plesk Extension
- How to Install LiteSpeed Web Server
- Install LiteSpeed Web Server from the LiteSpeed Plesk Extension
- Running Testing with a Port Offset
- Switching to LiteSpeed
- Switch between LiteSpeed and Apache
- LiteSpeed on Plesk: Configuration Process
- CloudLinux PHP Selector
- LiteSpeed Cache
- HTTP/2 and HTTP/3 through Apache Config
- WebAdmin Console
- Plesk Login Page
Requirements before installation
You’ll need these before you can proceed with the installation process:
An operational Apache server on Plesk
Your NGINX reverse proxy should be stopped, if you have one (we’ll get to this below)
A PHP handler set to FastCGI — this enables the LiteSpeed web server to follow the handler settings
How to stop the Nginx Reverse Proxy Properly
With the latest version of Plesk, NGINX may be configured as a reverse proxy server positioned between Apache and the Internet. You need to stop the NGINX reverse proxy before proceeding with the LiteSpeed web server installation, so that Apache operates as the sole web server for handling live web traffic.
The LiteSpeed process will be unable to start as required if you fail to do this.
If you don’t stop the NGINX reverse proxy, you’ll see the following notification when you attempt to access the LiteSpeed extension:
“LiteSpeed is not running. Apache is running (PID = 23136)
“NGINX reverse proxy server is currently running and must be stopped. Please go to ‘Server Management > Tools & Settings > Services Management’ and stop NGINX.”
So, to stop the reverse proxy, you’ll have to start at the Plesk Admin Console and navigate to: Server Management > Tools and Settings > Server Management > Services Management > Reverse Proxy Server (NGINX) , then hit the Stop button.
Once NGINX has come to a stop, verify that Apache has been configured to run on 80/443 like this:
netstat -lnp | grep httpd or netstat -lnp | grep apache
In the event that it hasn’t been configured that way, you’ll need to execute this command —
plesk repair web — to rebuild the Apache configuration file.
Installing the LiteSpeed Plesk Extension
Follow these steps to install the LiteSpeed Plesk Extension:
- Download the most recent Plesk extension from the LiteSpeed site
/usr/local/psa/admin/conf/panel.inito be edited: if this doesn’t exist yet, create it now.
- Add the following content before saving the file:
extensionUpload = true
- In Plesk: go to Extensions > My Extensions . Hit the Upload Extension button, then upload the package you downloaded in the first step.
How to Install LiteSpeed Web Server
You can use two methods for installing the LiteSpeed Web Server on Plesk: either via a script or the LiteSpeed Plesk Extension. Be aware, though, that the script won’t install the extension — it only installs LiteSpeed Web Server.
Installing LiteSpeed Web Server Via Script
Generally, this is the recommended technique if this is your first time installing LiteSpeed. We’ll explore all of the options presented throughout the installation stage in depth to help you complete it as efficiently as possible.
Installation LiteSpeed is simple. The first step is to sign into the SSH server.
Next, run this command (replace your _serial_nr with your License Key):
bash <( curl https://get.litespeed.sh ) your_serial_nr
This script will detect your environment and ensure only the necessary dependencies and installation data is downloaded from the servers. The script will ask you to answer a number of questions, depending on the environment detected, before it starts to install LiteSpeed Web Server.
If you want to take advantage of the script via a trial license, you’ll need to switch ‘your _serial_nr’ with the word TRIAL (written exactly like this, all in capitals) in this way:
bash <( curl https://get.litespeed.sh ) TRIAL
When you do this, you’ll request a trial license for your server automatically before LiteSpeed Web Server is installed on it. If you notice an error when you’re utilizing the Trial License, please take a look at this helpful FAQ .
When the script starts, it will recognize the installation uses Plesk. It will then present you with the following prompts to request your input:
Could not find an lsws.options file
Could not find an lsws.options file. We will ask you for your preferred settings instead, but for automated bulk provisioning, you may want to exit and create an lsws.options file. Continue Installer(Y/N) ?
Don’t worry: this is to be expected, as this is the detailed method of installation. lsws.options is for fast/automatic installation.
Press Y then Enter to continue.
Enable PHP_SUEXEC. Run PHP processes as the account owner. Available values: 0 (off), 1 (on), and 2 (user home directory only).
This option will stipulate how your server runs a PHP process — a value of “2” is advised for shared hosting servers (this is the default).
Apache port offset
Apache port offset. Run LiteSpeed in parallel with Apache. For example, if set to 1000, Apache will listen on port 80, and LiteSpeed on 1080. If set to 0, Apache and LiteSpeed will use the same port, and LiteSpeed will not automatically start after installation.
This option defines which port the LiteSpeed Web Server will bind to when you’ve installed it. You’re recommended to set the port offset to something besides 0 (such as the default value of 1000), as this will enable LiteSpeed and Apache to run simultaneously while you’re testing if LiteSpeed works properly on your server.
You can switch the port offset to 0 once the installation has been completed and you feel sure that your sites run as they should with LiteSpeed.
If you decide to set port offset to 0, LiteSpeed will begin following the installation and Apache will then come to a stop. You’ll also need to enable the Switch to LiteSpeed Automatically option (we’ll cover further down).
Admin username. For accessing LiteSpeed WebAdmin console.
This option defines what username you’ll utilize to gain entry to the LiteSpeed WebAdmin Console. This is valuable for getting into LiteSpeed Stats or taking control of LiteSpeed behavior following installation. It’s advised that you configure this to be fully secure. The default value is admin.
Admin email address
Admin email address. Receive important server notices, such as license expiration and server core dumps.
This option establishes the email address that you want to get warnings, errors, and notices from LiteSpeed Webserver. You’re recommended to choose an email address you monitor on a regular basis, to avoid missed updates. The default value is [email protected]
Switching PHP Handlers
Automatically switch PHP handlers for users and/or subscriptions inside of Plesk. Available values: 0 (No change), 1 (Switch just for users), 2 (Switch just for subscriptions), 3 (Switch for both users and subscriptions).
This option inquires whether you intend to switch PHP handlers for users and/or subscriptions within Plesk. The default value is 0.
Switching to LiteSpeed Web Server
Switch to LiteSpeed Web Server. Automatically switches at the end of the installation if the port offset is set to 0. Available values are 1 (enable) and 0 (disable).
This option defines if the installer should close Apache down automatically and switch to LiteSpeed Web Server after it’s been installed. You should set this to 1 if you configured Apache Port Offset to 0 earlier. The default value is 0
This utilizes shortcuts to ensure LiteSpeed is installed and deployed on Plesk as quickly as it can be.
In the majority of cases, it’s sufficient to run the installer script manually. You can automate the process for bulk provisioning through the following steps: create a
lsws.options file at the directory you run the script command (such as
/root/) or upload to your business’s internal repo instead. This will enable the installer to pick up installation options right from the file, without requesting input from users.
So, a default
lsws.options file will usually resemble the following:
admin_pass is a fresh option here, and is the password you’ll use to enter your LiteSpeed WebAdmin Console. Take care to set it as a secure password for internal usage only.
You can create
lsws.options and keep it on your local network for bulk provisioning, at a URL like
yourlink.com/yourinternalrepo/lsws.options. Then, run this command:
curl -o lsws.options yourlink.com/yourinternalrepo/lsws.options && bash <( curl https://get.litespeed.sh ) your_serial_no
yourlink.com/yourinternalrepo/lsws.options links to your personalized lsws.options file, which your servers should be able to access.
lsws.options is the lsws.options file’s location. It’s fine to leave it like this when the installer is being run from the directory that the lsws.options file is too.
your_serial_no is the LiteSpeed Web Server license key. If you want to request a Trial License, you can use TRIAL too, but if you encounter an error when utilizing the Trial license, check out the FAQ.
Install LiteSpeed Web Server from the LiteSpeed Plesk Extension
You’ll be able to access the LiteSpeed Plesk Extension via Server Management > Extensions > LiteSpeed Extension.
Click on Install LiteSpeed Web Server.
Once you’ve read the comprehensive License Agreement, tick the I agree box. You’ll also have to enter your license’s serial number or request a trial license instead.
Scroll down the page a little more and you’ll find Installation Options and WebAdmin Console Login .
For the Installation Options section, the default values should be fine, but it’s advised that you set a non-zero Port Offset when installing for the first time (such as 1000).
For shared hosting, **Enable PHP SuEXEC** is recommended and implemented by default. You’ll only need to input a password in the WebAdmin Console Login section, though you’re advised to utilize a different username than the default to maintain effective security.
When you feel ready to proceed, click on the Install button below the Web Admin Console Login section.
You’ll be presented with a message to confirm that LiteSpeed has been “installed successfully” . This will include details such as:
latest stable version
download directory created
At the bottom of the page, hit Okay and start LiteSpeed Web Server by clicking on the Restart LiteSpeed button.
If this process completes successfully, you should see a message on your LiteSpeed Extension page: this will inform you that LiteSpeed and Apache are operating on separate ports. Apache will run on the regular port 80 and LiteSpeed on 1080 (assuming your port offset is 1000).
You don’t need to test LiteSpeed on an offset port for staging servers or test environments, and LiteSpeed is unable to be tested on an offset port for certain applications (e.g. Magento, WordPress). In this case, you can just “Switch to LiteSpeed” from the extension GUI or command line for testing (as so):
Running Testing with a Port Offset
The major advantage of the port offset is that you’re able to run both LiteSpeed Web Server and Apache at the same time. So, you can test hosting your websites on LiteSpeed Web Server to ensure they work before you switch off Apache.
For example, we have set the port offset to 1000. Sites could be tested on ports 1080 and 1443 for HTTP and SSL requests (respectively).
When you feel satisfied that your websites run properly with Litespeed Web Server, you’ll be ready to switch to LiteSpeed Web Server as your primary server.
Switching to LiteSpeed
First, under the Switch between Apache and LiteSpeed heading, click on Switch to LiteSpeed to stop Apache and make LiteSpeed Web Server your main server ports: 80 and 443.
LiteSpeed will be running as your primary web server. You’ll be presented with a message stating that “LiteSpeed is running” and “Apache is not running”. It will also tell you that you “Switched to LiteSpeed successfully”.
Switch between LiteSpeed and Apache
You should switch between LiteSpeed and Apache via the LiteSpeed Extension.
Also, you can do this by running the switching script from this command line:
LiteSpeed on Plesk: Configuration Process
Straight out of the box, LiteSpeed works with Plesk PHP. The only step you need to take is to set PHP handler to FastCGI, to prevent mismatched PHP settings .
By default, LiteSpeed will honor Plesk’s PHP settings with no need for further configuration, but extra handlers will be needed if CloudLinux PHP Selector is enabled and you would rather use that as your PHP manager instead. We’ll cover this in more detail further on in this guide.
Disabling PHP Override
With LiteSpeed Web Server, you can disable the PHP override in .htaccess.
php_value and php_flag may be utilized in Apache configuration, or .htaccess to override php.ini settings. But they’re only supported by Apache’s mod_php handler, which is deprecated in the majority of the control panel systems after being replaced by php-fpm, LSPHP or fastcgi.
This means Apache should return an error if you place php_value or php_flag in .htaccess. You can find details in Plesk’s documentation .
You may see one of these errors:
500 internal server error
503 Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration.
The following error can be found in the domain error log in Domains > example.com > Logs:
/var/www/vhosts/example.com/httpdocs/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
/var/www/vhosts/example.com/httpdocs/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration
/var/www/vhosts/example.com/httpdocs/.htaccess: RewriteRule: bad flag delimiters
/var/www/vhosts/example.com/public_html/.htaccess: Invalid command 'suPHP_ConfigPath', perhaps misspelled or defined by a module not included in the server configuration.
LiteSpeed Web Server utilizes LSPHP, supporting
php_flag usage in .htaccess. LiteSpeed Web Server will not return a 500 error when you use these, as it tolerates these PHP overrides more than Apache does.
In certain situations, you may opt to disable such PHP overrides in .htaccess for LiteSpeed too. To achieve this, you can use a dedicated Apache directive
DisablePhpOverride htaccess (which may be utilized at the server level httpd.conf.).
Let’s look at an example: on Plesk, make a file named
DisablePhpOverrideLiteSpeed.conf in the following directory (depending on your system):
DisablePhpOverrideLiteSpeed.conf file should include this:
PHP is auto detected as of LiteSpeed Web Server v5.3. There’s no longer a need for manual PHP external app configuration, and the preferred PHP manager is Plesk.
But if you would prefer to have a customized configuration for a specific PHP version, you might be required to create and configure the external app manually. From LiteSpeed Web Server Admin Console, you can create lsphpXX (such as lsphp70, lsphp71, lsphp72) one at a time.
Just adjust the Name, Address and Command settings to align with the relevant PHP version. If you would prefer to use the command line rather than the GUI tool, though, you can edit the LiteSpeed Web Server configuration file instead. This is typically located at /usr/local/lsws/conf/httpd_config.xml.
CloudLinux PHP Selector
When you enable CloudLinux PHP Selection alongside Plesk PHP settings, you may be uncertain which PHP Selector is actually in effect. LiteSpeed automatically honors Plesk’s PHP selection straight out of the box, with no additional configuration necessary. So, you’ll have to make a few adjustments if you would like to use CloudLinux PHP Selector:
Set up an extra handler for LiteSpeed: this will force Plesk PHP to point to CloudLinux for non alt-phpxx versions.
Select a non alt-php version in Plesk’s PHP settings.
Together, these actions will make the CloudLinux PHP Selector come into effect.
Configure Extra Handler
Go to LSWS Web Admin Console > Server > PHP > Add PHP Handlers and follow these instructions:
Handler ID: php
Handled Suffixes: php, php54, php55, php56, php70, php71, php72, php73, php74
These settings will cause those Plesk PHP versions listed to utilize the CloudLinux PHP selector.
You can edit LiteSpeed’s configuration directly if you would rather take this route:
Enter the following in
php, php54, php55, php56, php70, php71, php72, php73, php74
Select Plesk PHP
After the handler has been created, go to Plesk’s PHP settings and pick any PHP version (the PHP support dropdown) that’s not one of the alt-php versions (i.e. one of those listed in the PHP handler that has just been created). This will make sure that CloudLinux PHP selection is utilized.
LiteSpeed Cache for WordPress
The LiteSpeed Cache plugin can be mass installed in each WordPress installation on your server using the LiteSpeed Plesk Extension. Once you’ve installed the LiteSpeed Plesk Extension, you could see a No Cache Management data file found message.
Set Cache Root
Click Manage Cache Installations , and then Set Missing Cache Roots in the Cache Root Setup section.
Scan and Enable
Once you have set up the cache root successfully, navigate back to the extension main page. Then, click the Manage Cache Installations option again.
Next, you will need to scan for WordPress installations across the server and install LSCache for WordPress (LSCWP) on them. First, though, you’ll have to select the LSCache plugin version you want to install. Typically, it’s recommended that you pick the latest version.
This is a fairly simple process thanks to the user-friendly layout. Once you begin scanning, this could take some time based on the number of sites you have.
When the scan ends, you’ll get to manage those WordPress sites found. You can use the Discover New button in future: this will help to save time as only scans for sites that haven’t been discovered yet.
Now you’ll be able to activate the LiteSpeed Cache Plugin for WordPress individually or use bulk activation for a number of websites instead. You should notice a green light symbol in the Cache Status column when LSCWP has been activated successfully.
If you want to verify a site is cached, take a look at the x-litespeed-cache:hit response header, which indicates that the caching is running properly.
QUIC connections use UDP port 443. You need to make sure it’s not being blocked by your firewall.
HTTP/2 and HTTP/3 through Apache Config
You may enable and disable a number of protocols (such as HTTP/3 and HTTP/2) in httpd.conf, by utilizing the SpdyEnabled directive, as so:
Alternative parameters that are valid include:
By default, all protocols are enabled, which means there’s no requirement for a SpdyEnabled directive if you want to use all SPDY, HTTP/2 and HTTP/3 protocols.
When using this directive to enable protocols, anything you don’t select will actually be disabled. So, for instance, SpdyEnabled http2 enables HTTP/2 while disabling SPDY and HTTP/3. Take care not to accidentally disable one or more protocols you need to use.
To strengthen Plesk’s security features, enable TLS 1.3 and disable weak cipher suites. TLS1.0, TLS1.1, TLS1.2 will be enabled by Plesk configuration by default, and this guide will demonstrate how to enable TLS 1.3.
This guide is created and tested on Plesk 17.8 as well as Centos 7.5. Configuration files must be in
/etc/apache2/mods-available/ssl.conf for Debian/Ubuntu Plesk.
Remember: as with any changes to Apache config files, you’ll have to restart the server when making the below adjustments. Use the following command with restarts:
systemctl restart lsws
Edit the file /etc/httpd/conf.d/ssl.conf.
Locate this line and comment out (using #):
SSLProtocol +TLSv1 +TLSv1.1 +TLSv1.2
Replace this with the following:
SSLProtocol TLSv1.1 TLSv1.2 TLSv1.3
This enables TLS1.1, TLS1.2 and TLS1.3.
Want to disable TLS1.1 too? Change the line to the following:
SSLProtocol TLSv1.2 TLSv1.3
Disabling Weak Cipher Suites (this is optional)
Plesk also includes a number of weak cipher suites by default, but you can disable them with:
Then, replace it with the following:
Please be aware, though, this can lead to CPU load. Testing is performed through SSL Labs.
The LiteSpeed WebAdmin Console utilizes port 7088 rather than 7080 for Plesk. Take a look at your firewall to determine if port 7088 is enabled, and then you will likely have access to WebAdmin via https://SERVER_IP:7088.
Plesk Login Page
It’s possible to set up a Plesk login page with no need for a URL port number — for instance,
https://IP-or-domain:8430 may become
Make a vhost in Plesk then put this rewrite rule in its .htaccess:
RewriteRule ^(.*)$ https://127.0.0.1:8443/$1 [P,L]
This brings our insightful guide on how to install LiteSpeed on Plesk to a close. Thank you for reading — we hope it helps you get off to a great start!