Commands Reference

This reference lists all of the commands for LiteSpeed WebServer (LSWS) and LiteSpeed Web ADC (ADC).

Note: LiteSpeed Web ADC was previously known as LiteSpeed Load Balancer, hence the lslb references throughout.

By default, the commands covered here can be found in /usr/local/lsws/bin/ for LSWS and in /usr/local/lslb/bin/ for ADC.

Usage: ./lswsctrl {start|stop|restart|reload|condrestrt|try-restart|status|help}

start       - start web server
stop        - stop web server
restart     - gracefully restart web server with zero down time
reload      - same as restart
condrestart - gracefully restart web server if server is running
try-restart - same as condrestart
status      - show service status
help        - this screen

Note: For ADC, the command is ./lslbctrl.

SysVinit

service lsws {start|restart|stop|reload|condrestart|try-restart|status|help}

start       - start web server
stop        - stop web server
restart     - gracefully restart web server with zero down time
reload      - same as restart
condrestart - gracefully restart web server if server is running
try-restart - same as condrestart
status      - show service status
help        - this screen

To enable auto-start on system boot:

 chkconfig lsws {on|off} 

systemd

systemctl {start|restart|stop|reload|condrestart|try-restart|status} lsws 

start       - start web server
stop        - stop web server
restart     - gracefully restart web server with zero down time
reload      - same as restart
condrestart - gracefully restart web server if server is running
try-restart - same as condrestart
status      - show service status

To enable auto-start on system boot:

systemctl enable lsws

Note: The lsws parameter used with systemctl may vary depending on the environment. It may also be litespeed or lshttpd. For Web ADC, use lslb.

  • Register a new license key (-r)
/usr/local/lsws/bin/lshttpd -r
  • Test current license locally (-t)
/usr/local/lsws/bin/lshttpd -t
  • Verify current license against license server (-V). This Command will force communication with LiteSpeed licensing server immediately.
/usr/local/lsws/bin/lshttpd -V
  • Migrate current license (-m)
/usr/local/lsws/bin/lshttpd -m
  • If you forget your admin web console login, you can reset your password from the command line
  /usr/local/lsws/admin/misc/admpass.sh
  • Check version
  /usr/local/lsws/bin/lshttpd -v
  • Switch version
  /usr/local/lsws/admin/misc/mgr_ver.sh <version>
  • Force re-install/update
  /usr/local/lsws/admin/misc/lsup.sh -f -v <version>
  • Force re-install/update to a specific version and build
  /usr/local/lsws/admin/misc/lsup.sh -f -v <version> -b <build number>
  • Install/Uninstall startup script
  /usr/local/lsws/admin/misc/rc-inst.sh
  /usr/local/lsws/admin/misc/rc-uninst.sh    
  • Admin
  • Last modified: 2019/09/24 15:31
  • by Jackson Zhang