OpenLiteSpeed Command References for Administration

This administration guide lays down the basic commands for those who wish to control OpenLiteSpeed from the command line.
By default, OpenLiteSpeed is installed under /usr/local/lsws/.

Control Commands

  • Start OpenLiteSpeed: /usr/local/lsws/bin/lswsctrl start
  • Stop OpenLiteSpeed: /usr/local/lsws/bin/lswsctrl stop
  • Gracefully restart OpenLiteSpeed (zero downtime): /usr/local/lsws/bin/lswsctrl restart
  • Show OpenLiteSpeed commands: /usr/local/lsws/bin/lswsctrl help

Miscellaneous Commands

  • Reset the WebAdmin password from the command line: /usr/local/lsws/admin/misc/admpass.sh
  • Switch between XML and plain text configuration files: /usr/local/lsws/conf/switch_config.sh
  • Check OpenLiteSpeed version: /usr/local/lsws/bin/lshttpd -v

Test New Version

  • Testing new version becomes easier in recent versions starting from 1.4.45:

Upgrade test to a specific version:

/usr/local/lsws/admin/misc/testbeta.sh <new_version>

Upgrade test to the latest version if no parameter specified:

/usr/local/lsws/admin/misc/testbeta.sh

Recover mode can reverse back to old version with “-r”:

/usr/local/lsws/admin/misc/testbeta.sh -r

However, this tool only updates binary file and lswsctrl file but no other files, hence you may still see old version file at /usr/local/lsws/VERSION.  To check the real bianry version, you should run

/usr/local/lsws/bin/openlitespeed -v

This tool is not yet to be a full upgrade/downgrade tool at this stage.

You may also like...