Skip to main content

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.

Quick Summary
  • Server-wide logs are in /usr/local/lsws/logs/.
  • Per-vhost logs are configured in vhconf.conf and may live under your vhost directory.
  • Use tail -f for live debugging and pair logs with a single request you can reproduce.

Common log locations

PathWhat it isWhen you use it
/usr/local/lsws/logs/error.logGlobal error log500/503 errors, config issues, TLS problems
/usr/local/lsws/logs/access.logGlobal access log (if enabled)Request tracing, response codes
/usr/local/lsws/admin/logs/error.logAdmin UI error logAdmin console issues
/usr/local/lsws/logs/Log directoryRotation, disk usage checks

Your virtual host may define its own paths for accessLog and errorLog inside vhconf.conf.

Tail logs safely

tail-ols-error-log.sh
sudo tail -n 200 /usr/local/lsws/logs/error.log

For live follow while you reproduce a problem in the browser:

follow-ols-error-log.sh
sudo tail -f /usr/local/lsws/logs/error.log

To search for a specific domain, status code, or request path:

search-ols-logs.sh
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 Unavailable
  • LSAPI errors
  • 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
journalctl-openlitespeed.sh
sudo journalctl -u lsws --no-pager -n 200

Common error patterns

Log snippet keywordMeaningTypical fix
Permission deniedFile/dir ownership or SELinux/AppArmor issueFix permissions; confirm OLS user can read docroot
cannot open filePath mismatch (docroot, include, cert)Correct the path in vhost/listener config
SSL / certificateTLS file missing/invalid permsVerify fullchain.pem and privkey.pem paths and perms
LSAPI / lsphpPHP handler issueRestart lsws; check PHP binary/version; confirm extensions
Too many connectionsResource limit reachedTune 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:

check-ols-log-directory-size.sh
sudo du -sh /usr/local/lsws/logs

To see the largest files:

largest-ols-log-files.sh
sudo ls -lh /usr/local/lsws/logs | sort -k 5 -h

warning

Do not delete active log files while the service is running unless you know your rotation strategy. Prefer logrotate or built-in rotation settings.