Wiki
Command unknown: diff135553737
 

How to Convert Standalone Apache to LiteSpeed

This wiki covers how to set up LSWS (either Enterprise or Standard editions) on a server that already has a working Apache installation but no control panel.

Step 1: Install LiteSpeed Speed Web Server

1.1 Download

Download LSWS tarball from the LiteSpeed Technologies website.

Run the following commands from ssh as root

cd /root
wget http://www.litespeedtech.com/packages/4.0/lsws-4.2.12-ent-x86_64-linux.tar.gz

Note: Replace the values in the URL to control for your OS and which version/edition of LSWS you wish to download:

lsws-4.2.12-ent-x86_64-linux = LSWS Enterprise 4.2.12 for 64bit Linux

lsws-4.2.10-std-i386-linux = LSWS Standard 4.2.10 for 32bit Linux

lsws-4.2.12-ent-x86_64-freebsd6 = LSWS Enterprise 4.2.12 for 64bit FreeBSD 6.x

1.2 Unpack

tar zxfv  lsws-4.2.12-ent-x86_64-linux.tar.gz

1.3 Run the installation script

For Enterprise Edition, make sure to put the license file (trial.key or paid license serial.no file in the unpacked folder).

cd lsws-4.2.12
./install.sh

The installer will ask you a number of questions (covered in detail here). When in doubt, choose the default for all questions:

  • LiteSpeed target install directory (/usr/local/lsws).
  • Listen port (8088).
  • Assign a username and password for LSWS web admin console.
  • Your email address as the Administrators email.

Step 2: Install PHP

Two options for setting up PHP for LiteSpeed:

  1. Enable the LiteSpeed repository and download LSPHP from our repository. See instructions here.
  2. If you are not using CentOS or you need PHP packages that are not included in our repository, you can build your own PHP from source. See instructions here.

Step 3: Load Apache Configuration in LSWS

Open LiteSpeed Web admin console, under “server”→“General” tab, change configurations in “Using Apache Configuration File” table.

Load Apache Configuration => Yes
Auto Reload On Changes => Use Apache Binary Wrapper 
Apache Configuration File => /usr/local/apache/conf/httpd.conf
Apache Port Offset => 2000 (Try LiteSpeed on port 2080 and 2443 first, change to 0 later, do NOT use 8088 or 8008)
Apache IP Offset => 0 
PHP suEXEC => Yes (Run PHP in suEXEC mode)
PHP suEXEC Max Conn => 5 (The maximum PHP processor each account can have)

Note:

  • “PHP suEXEC Max Conn” can be adjusted based how many and how big the sites has been hosted. For a server dedicated for a large Wordpress or vBulletin site, you can safely increase it to “10”, “15” or “20”, try different value and see what is the best for you.
  • Different system/platform, default Apache Configuration File is different. For example, for CentOS, it is located at /etc/httpd/conf/httpd.conf; for WHM/cPanel, it is /usr/local/apache/conf/httpd.conf.

Step 4: Start LiteSpeed again

Restart LSWS and try web sites hosted on port 2080 and secured sites on 2443. If all sites work properly, stop Apache, change “Apache Port Offset” to 0, restart LSWS, all hosted web sites are powered by LiteSpeed now.

Note: Remember to change rc script configuration to remove httpd from the services that get started automatically during a reboot. For example, On CentOS, try this from a root shell:

 chkconfig httpd off

Step 5: Monitor

If you have a script that monitors for the web server process, remember to update it to reflect the location of LSWS.

That's it.

 
litespeed_wiki/apache/migration.txt · Last modified: 2014/12/10 14:20 by Michael Armstrong