OpenLiteSpeed Logs
OpenLiteSpeed keeps server-wide and per-virtual-host logs under /usr/local/lsws/. When WordPress returns 500/503 errors, loads slowly, or TLS misbehaves, the error log is usually the fastest way to identify the root cause.
- Server-wide logs are in
/usr/local/lsws/logs/. - Per-vhost logs are configured in
vhconf.confand may live under your vhost directory. - Use
tail -ffor live debugging and pair logs with a single request you can reproduce.
Common log locations
| Path | What it is | When you use it |
|---|---|---|
/usr/local/lsws/logs/error.log | Global error log | 500/503 errors, config issues, TLS problems |
/usr/local/lsws/logs/access.log | Global access log (if enabled) | Request tracing, response codes |
/usr/local/lsws/admin/logs/error.log | Admin UI error log | Admin console issues |
/usr/local/lsws/logs/ | Log directory | Rotation, disk usage checks |
Your virtual host may define its own paths for accessLog and errorLog inside vhconf.conf.
Tail logs safely
sudo tail -n 200 /usr/local/lsws/logs/error.log
For live follow while you reproduce a problem in the browser:
sudo tail -f /usr/local/lsws/logs/error.log
To search for a specific domain, status code, or request path:
sudo rg -n "example.com|wp-login\.php|503|500" /usr/local/lsws/logs/*.log
Pair web server logs with PHP logs
OpenLiteSpeed errors often point to PHP handler problems (lsphp crashes, timeouts, missing extensions). If you see:
503 Service UnavailableLSAPIerrors- timeouts while generating pages
...you likely need the PHP handler logs as well.
Common places to check (depends on PHP version and packaging):
/usr/local/lsws/logs/stderr.log/var/log/php*-fpm.log(if using PHP-FPM behind OLS)- system journal:
journalctl -u lsws
sudo journalctl -u lsws --no-pager -n 200
Common error patterns
| Log snippet keyword | Meaning | Typical fix |
|---|---|---|
Permission denied | File/dir ownership or SELinux/AppArmor issue | Fix permissions; confirm OLS user can read docroot |
cannot open file | Path mismatch (docroot, include, cert) | Correct the path in vhost/listener config |
SSL / certificate | TLS file missing/invalid perms | Verify fullchain.pem and privkey.pem paths and perms |
LSAPI / lsphp | PHP handler issue | Restart lsws; check PHP binary/version; confirm extensions |
Too many connections | Resource limit reached | Tune limits, add caching, reduce bot traffic |
Log rotation and disk usage
If your disk fills up, WordPress and MySQL will fail in ways that look unrelated. Keep an eye on log growth:
sudo du -sh /usr/local/lsws/logs
To see the largest files:
sudo ls -lh /usr/local/lsws/logs | sort -k 5 -h
Do not delete active log files while the service is running unless you know your rotation strategy. Prefer logrotate or built-in rotation settings.