If you’re using OpenLiteSpeed as your web server, here are some useful commands you can use when you’re logged into the server via ssh.

View OpenLiteSpeed Version #

/usr/local/lsws/bin/lshttpd -v

Check for Configuration Errors #

usr/local/lsws/bin/openlitespeed -t

Start OpenLiteSpeed #

systemctl start lsws

Note that this does NOT restart the PHP processes – it only restarts the main lsws process.

Stop OpenLiteSpeed #

systemctl stop lsws

Graceful Restart With Zero Downtime #

systemctl restart lsws

Note that this does NOT restart the PHP processes – it only restarts the main lsws process.

Restart Full Stack Including PHP Processes #

Run the following in sequence:

/usr/local/lsws/bin/lswsctrl stop killall -9 lsphp systemctl stop lsws systemctl start lsws

Show OpenLiteSpeed Commands #

/usr/local/lsws/bin/lswsctrl help


More Topics In Tips, Techniques & Education. #