Updated: 12/16/2022

DirectAdmin has a very nice system for rebuilding PHP that works almost the same way EasyApache would on cPanel. In DirectAdmin, it’s called CustomBuild 2.0. We are going to show how to properly install litespeed and rebuild PHP correctly with it.

Installing is very straight forward. Simply run the following:

cd /usr/local/directadmin/custombuild
./build update
./build set webserver litespeed
./build set php1_mode lsphp
./build set php2_mode lsphp
./build set php3_mode lsphp
./build set php4_mode lsphp
./build litespeed
./build php n

The above would recompile PHP to use LiteSpeed. It’s now installed. Also, check your logs /var/log/httpd to make sure you don’t have any errors. You should be set now and have a trial version of LiteSpeed installed!

Licensing DirectAdmin

To properly license DirectAdmin with a serial number, do the following:

cd /usr/local/lsws
echo "SERIAL_NO" > conf/serial.no
bin/lshttpd -r

If license key has been registered successfully, you will see a new “license.key” under conf/, you can verify your new key with command

bin/lshttpd -V