Actions

Help

Install:Upgrading From 1.3.x to 1.4.x

From OpenLiteSpeed Wiki

This wiki is now deprecated since all new RPMS are named as openlitespeed and will upgrade to the latest version when you run "yum update".

OpenLiteSpeed 1.4.13 is now stable and comes with a bunch of amazing features not available in 1.3.x. A newly designed WebAdmin Console interface with support for multiple languages makes for a fresh new way to manage your server. For veteran linux users, editing a plain text configuration file is often preferable to editing an XML file. Understanding this we have made the switch from XML to a plain text configuration file with OLS 1.4.x. Also newly supported in 1.4.x is the PageSpeed module to accelerate your website, SHM support in LSAPI,mod_Lua, and large file support. Other changes include enhancements to the cache module, HTTP2, and SSL Renegotiation Protection. These new features and improvements will make your server safer, faster, and feature rich. We recommend upgrading your server to the latest stable openlitespeed version, 1.4.13.


Upgrading From 1.3.x to 1.4.x Using Source Code

The change from an XML to a plain text conf is a big difference, however the upgrade process is very easy.

Backup the entire web server directory

            cp -pr /usr/local/lsws/ /usr/local/lsws13bak/

Download the latest version of openlitespeed (1.4.13) and unpack it. You may configure with your preferred options but the --prefix parameter should be set to the same directory as your existing installation. If the same directory is not set, a fresh installation will be performed instead of upgrade.

            wget http://open.litespeedtech.com/packages/openlitespeed-1.4.13.tgz
            tar zxvf openlitespeed-1.4.13.tgz
            cd openlitespeed-1.4.13
            ./configure --prefix=/usr/local/lsws  ( with other options you choose to set )
             make
             make install

Your server will be upgraded to the new version and the existing configuration.XML file will then be backed up and converted to a plain text file. The following warning message will also be displayed:

    “Warning: This version uses a plain text configuration file which can also be modified by hand.
       The XML configuration file for your current version (1.3.x or below) will be converted
       by the installation program to this format and a copy will be made of your current XML
       file named <filename>.xml.bak. If you have any installed modules, they will need to be
       recompiled to comply with the upgraded API.
       Are you sure you want to upgrade to this version? [Yes/No] “
       
        Simply confirm with “Yes” or “Y”.

Restart your server:

service lsws restart

Upgrading From 1.3.x to 1.4.x Using RPMs

If you are using CentOS/RedHat and installed OpenLiteSpeed 1.3.x through RPMs, installing the new 1.4.x RPM will upgrade your server. We have renamed the OpenLiteSpeed package to openlitespeed14 to avoid an automatic upgrade and placed it in the same repository as 1.3.x. We strongly recommend backing up your entire web server directory before upgrading:

 cp -pr  /usr/local/lsws/ /usr/local/lswsbak/

Since the openlitespeed14 package conflicts with the existing OpenLiteSpeed package, you will have to uninstall your current OpenLiteSpeed package and completely remove the server directory.

 yum remove openlitespeed
 rm -rf /usr/local/lsws

Now copy your configuration and website files back to /usr/local/lsws/ before beginning installation. If you do not copy these files back beforehand, a fresh installation will be performed instead of an upgrade.

cp -pr /usr/local/lswsbak/ /usr/local/lsws/
yum install openlitespeed14

Reverting back to 1.3.x from 1.4.x (Source Code Install)

If for any reason you would like to revert back to 1.3.x, simply run the recover script from the backup folder, which will convert your configuration file back from plain text to XML.

cd /usr/local/lsws/backup/
./recover_xml.sh

then re-install 1.3.x

           wget http://open.litespeedtech.com/packages/openlitespeed-1.3.x.tgz
            tar zxvf openlitespeed-1.3.x.tgz
            cd openlitespeed-1.3.x
            ./configure --prefix=/usr/local/lsws  ( with other options you choose to set )
            make
            make install

--prefix directory should be set to the same directory as your existing installation. If the same directory is not set, a fresh installation will be performed instead of a downgrade.

Restart your web server and it should reverse back to previous version

      service lsws restart


Reverting back to 1.3.x from 1.4.x (RPM Install)

Navigate to the backup folder and run the recovery script:

 ./recover_xml.sh

then simply re-install 1.3.x

yum install openlitepseed-1.3.x

How To Convert Inactive/Missed VHost Configurations From XML To Plain Conf

If a vhost's XML configuration file is not specified/defined in the main server's configuration, it will not be automatically converted during migration from 1.3.x to 1.4.x.

There are two ways of manually converting these files after migration:

1. Downgrade your OpenLiteSpeed version to 1.3.x and activate/add the missed vhosts in the main server's configuration, then perform the migration again.

2. Add the vhost to your 1.4.x installation and the XML file will be converted to a plain conf file automatically.


For Example: Say you have a test1 vhost configuration file that was not converted during the migration and is located under /usr/local/lsws/test1/conf/vhconf.xml. The virtual host root directory is /usr/local/lsws/test1/ with document root /usr/local/lsws/test1/html.

In OpenLiteSpeed 1.4.x all vhost configuration files have been consolidated to a central location in /usr/local/lsws/conf/vhosts/ under "VH_NAME" instead of scattering them in different places.

To convert this missed virtual host XML configuration file, simply create a virtual host folder, copy over your XML configuration file, and change the ownership of the folder to lsadm:

 mkdir /usr/local/lsws/conf/vhosts/test1/
 cp /usr/local/lsws/test1/conf/vhconf.xml /usr/local/lsws/conf/vhosts/test1/vhconf.xml
 chown -R lsadm:lsadm /usr/local/lsws/conf/vhosts/test1/

From the WebAdmin Console, try to add this virtual host under Virtual Hosts -> Add, and then enter the required information -- replacing ".xml" with ".conf" for the config file. In this example, we are create virtual host test1 with configuration file "vhconf.conf". As "vhconf.conf" does not yet exist, the server will create a blank plaintext configuration file with this file name.

 Virtual Host Name: test1
 Virtual Host Root: /usr/local/lsws/test1/
 Config File: /usr/local/lsws/conf/vhosts/test1/vhconf.conf  (You can no longer specify an XML file here. Enter the exact same virtual host name with ".conf" isntead. 
 Enable Scripts/ExtApps: yes
 Restrained: no

Save and gracefully restart OpenLiteSpeed.

Lastly, access vhost test1 from the WebAdmin Console. It is at this point that the server will check if a matching XML version of the configuration file exists. If such a file is found, the server will then automatically create a backup of "vhconf.conf" as "vhconf.conf.bak" and convert "vhconf.xml" to the new plaintext "vhconf.conf". Feel free to make any proper changes after the conversion has taken place.