Skip to main content

OpenLiteSpeed Cheatsheets

Eight comprehensive quick-reference cards covering every major area of OpenLiteSpeed administration. Each cheatsheet is designed for fast lookup — scan the headers, find your section, copy the command.

How to Use These
  • Open in a tmux pane beside your work session
  • Browse them in yazi with yazi /path/to/docs
  • Search across all cheatsheets with grep -r "your term" .
  • Pipe any section into opencode for contextual help

Cheatsheets in This Module

CheatsheetWhat It Covers
CLI Quick ReferenceAll CLI commands — service control, logs, diagnostics, PHP
Config File Syntaxhttpd_config.conf and vhconf.conf directives reference
Virtual Host SetupComplete vhost workflow from mkdir to live site
PHP & lsphp Tuninglsphp configuration, OPcache, process limits, extensions
Security HardeningSSL, headers, IP restrictions, ModSecurity, rate limiting
Performance TuningCaching, compression, HTTP/2, connection settings
Troubleshooting MatrixErrors, symptoms, root causes, and exact fixes
Automation & Bash ScriptsReusable scripts, cron patterns, opencode AI workflows

Core File Paths — Always Know These

/usr/local/lsws/
├── bin/lswsctrl # Service control (start/stop/restart)
├── bin/lshttpd # Main daemon binary
├── conf/httpd_config.conf # Master server config
├── conf/vhosts/<name>/
│ └── vhconf.conf # Per-site config
├── logs/error.log # ERROR LOG — check this first
├── logs/access.log # Access log
├── admin/misc/admpass.sh # WebAdmin password reset
├── lsphp84/bin/lsphp # PHP 8.4 binary
└── lsphp84/etc/php/8.4/ # PHP ini directory

60-Second Emergency Commands

# Is the server alive?
sudo systemctl status lsws

# What errors just happened?
sudo tail -30 /usr/local/lsws/logs/error.log

# Apply config changes without dropping connections
sudo /usr/local/lsws/bin/lswsctrl restart

# Full restart (drops active connections)
sudo systemctl restart lsws

# Test site from server itself
curl -I http://localhost

# Check what ports OLS is using
sudo ss -tlnp | grep lshttpd

# Reset WebAdmin password
sudo /usr/local/lsws/admin/misc/admpass.sh