2.7.2. OpenLiteSpeed

LiteSpeed is a web server developed by LiteSpeed Technologies, which is an alternative to the Apache web server and is compatible with its most common features like .htaccess and mod_rewrite... First of all, LiteSpeed is interesting in that it allows you to speed up the work of sites by using specialized plugins for various CMS. These plugins provide integration with the LiteSpeed Cache (LSCache).

It comes in two flavors — the open source version of OpenLiteSpeed and the paid version of LiteSpeed Enterprise. The hosting uses the first option — OpenLiteSpeed, which has a number of differences from the paid version:

  • Changes to the .htaccess file are not tracked — changes made to it do not start working instantly, but with some delay.
  • There is no ESI support — because of this, plugins for integrating with LSCache will not work in all CMS (for example, they cannot be launched in PrestaShop and Magento — plugins for these CMS require ESI support).

The LiteSpeed web server has certain features and is different from the Apache web server. That is why it does not support some of the Apache features that you have to drop in order to use it.


  • Can be used PHP version not lower than 5.4.
  • Exist a number of significant nuances when working with a .htaccess file.
  • Unable to run scripts:
    • Python.
    • Perl.
    • CGI.
  • Automatic request filtering module is not supported mod_security.
  • Module not supported LiteMage.
  • Symbolic links (symbolic links to other files or directories) are not supported. If you try to open such a link, a 403 code will be returned.
  • The rules specified in the .htaccess file are activated on the first request to the site and then updated every 5 minutes (every 300 seconds). Because of this, changes in directives do not take effect immediately and should be expected to be applied.
  • From .htaccess directives only directives work Rewrite (except RewriteBase) and the directive Option +SymLinksIfOwnerMatch... All other directives will be ignored.
  • So that all directives Rewrite were correctly processed by the LiteSpeed web server, they need to be changed in accordance with instruction... For example, a rule for Apache that looks like this:
    RewriteRule ^example/(.*)$ another/example/$1 [L]

    Within LiteSpeed it should look like this:

    RewriteRule ^/?example/(.*)$ another/example/$1 [L]

    Unlike Apache, in LiteSpeed, rules must clearly indicate a specific directory from where or where the redirect will be made. At the beginning of directories or file names, you need to set /to set the starting root position.

  • To configure directives that will only be used by the LiteSpeed web server, you can use the wrapper IfModule... Example:
    <IfModule LiteSpeed>
      RewriteCond %{REQUEST_URI} ^/example/$
      RewriteRule ^.*$ http://%{HTTP_HOST}/another/example/ [R=301,L]
  1. Check out peculiarities of work OpenLiteSpeed and make sure your site takes them into account.
  2. Openup site settings.
  3. Pleaseselect «OpenLiteSpeed» in field «Webserver» and at the bottom of the page click «Save»:
  4. Wait approximately 10-15 minutes for the changes to take effect.

For OpenLiteSpeed, you can set your own error page, which will be displayed to the user instead of the standard web server page.

  1. Openup site settings.
  2. Specify the path to the error page file in the field «Own error page for OpenLiteSpeed» and at the bottom of the page click «Save».
  3. Wait a few minutes for the changes to take effect.