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
| Cheatsheet | What It Covers |
|---|---|
| CLI Quick Reference | All CLI commands — service control, logs, diagnostics, PHP |
| Config File Syntax | httpd_config.conf and vhconf.conf directives reference |
| Virtual Host Setup | Complete vhost workflow from mkdir to live site |
| PHP & lsphp Tuning | lsphp configuration, OPcache, process limits, extensions |
| Security Hardening | SSL, headers, IP restrictions, ModSecurity, rate limiting |
| Performance Tuning | Caching, compression, HTTP/2, connection settings |
| Troubleshooting Matrix | Errors, symptoms, root causes, and exact fixes |
| Automation & Bash Scripts | Reusable 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