I decided to take the plunge and get rid of Apache for something with a smaller footprint and twice the power: Litespeed.
I got a little tired of having to constantly monitor apache as it frequently took up too much memory and affected other services. Sometimes this resulted in my VPS having services killed off for too much memory usage by Virtuozzo.
As I write this, Litespeed is currently running at 14.4MB RAM usage and 0.1% CPU usage. Compare that to Apache swallowing a whopping 80MB+ or RAM, not to mention CPU time you can probably see why switching over to Litespeed is a good idea!
The main selling point of Litespeed for me was the easy replacement of Apache on a WHM/cPanel server. It’s very easy to configure Litespeed to utilise the Apache configuration files that WHM/cPanel writes to. This has the benefit of being fully integrated into the custom tools that WHM and cPanel use in their respective control panels.
Here’s a very quick guide on how to install it.
wget http://litespeedtech.com/packages/3.0/lsws-3.3-std-i386-linux.tar.gz tar -xvfz lsws-3.3-std-i386-linux.tar.gz cd lsws* ./install.sh
Once you’ve run through the configuration interface you can now setup Litespeed to load the Apache configuration file. Login through the new administration interface and click Configuration -> Server. Change the following.
Load Apache Configuration => Yes Auto Reload On Changes => Yes Apache Configuration File => /usr/local/apache/conf/httpd.conf Apache Port Offset => 2000
You do have the option to enable PHP suEXEC for additional security, although if you enable this you won’t be able to use an opcode cache like APC.
Once you’ve made sure that Litespeed is functioning correctly, you can go back to the above configuration and change the Apache Port Offset to 0 and then disable Apache.
For more thorough guides on how to setup Litespeed and a custom PHP install, I’d suggest visiting Litespeed Install and Litespeed custom PHP.