Skip to content
Docs / Install

Set up Pagereckon on LiteSpeed or OpenLiteSpeed

LiteSpeed Web Server and OpenLiteSpeed both write an access log, and Pagereckon reads it to count people, bots and AI crawlers. The path depends on which of the two you run, so this guide covers both.

There is good news for cached sites, too. Pages served from the server's own cache still land in the access log, so you see the full picture.

The Pagereckon team Updated
Litespeed at a glance, from Pagereckon

LiteSpeed Enterprise on a hosting panel

LiteSpeed Web Server, the paid edition, can work as a drop in for Apache. Its docs say it accepts Apache directives in Apache configuration files. As a result, the access log usually stays where the panel put it for Apache.

  • On cPanel, use the domain log, such as ~/access-logs/example.com-ssl_log. See the cPanel guide.
  • On CWP, use /usr/local/apache/domlogs/example.com.log. See the CWP guide.
  • On Plesk or DirectAdmin, use the domain log of that panel.

In short, follow the guide for your panel. The Find my log wizard already checks those paths.

OpenLiteSpeed access log paths

OpenLiteSpeed has its own config, set in the WebAdmin Console. The server log sits under the server root, which is /usr/local/lsws on a default install. Each virtual host can also have its own access log.

LiteSpeed and OpenLiteSpeed paths the Find my log wizard checks
PathWhat it is
`/usr/local/lsws/logs/access.log`Server access log (`$SERVER_ROOT/logs/access.log`)
`/usr/local/lsws/logs/example.com.access.log`Per site log, if you named it that way
`/var/log/lsws/example.com.access.log`Per site log on some packaged installs

To check the real path, open the WebAdmin Console, go to the virtual host, and look at its log settings. Then use that file.

Set a LiteSpeed log format with referrer and user agent

Pagereckon reads the combined and common formats and JSON lines. Combined works best, because it holds the referrer and the user agent. Without them, Pagereckon cannot name the source of a visit or the bot behind a request.

In OpenLiteSpeed you set the format under Server Configuration, Log, in the Log Format field. The docs note that this field overrides Log Headers. Use the combined string:

Log Format
%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-agent}i"

Restart OpenLiteSpeed after the change. Then new lines use the new format.

Pick the LiteSpeed log in Find my log

First, download the free plugin, install it and activate it. Then open Pagereckon, Settings. The Find my log table lists each file PHP can read, with its format and a check mark when the lines belong to your site.

Press Use this log next to the right file. When it is not in the list, paste the path into Test a path. The test reads a short sample of lines, shows the format, and hides the IP in the sample. If it reports that PHP cannot read the file, give the PHP user read rights, or check open_basedir.

Rolling logs and .gz archives

OpenLiteSpeed rolls its logs by size. The docs example uses rollingSize 10M, keepDays 30 and compressArchive 0. With compression on, old copies end in .gz.

Pagereckon handles this on its own. It reads new lines every 10 minutes and notices when a file starts over. In addition, you can import past days with a pattern such as /usr/local/lsws/logs/access.log*. Pagereckon reads each .gz copy once.

LiteSpeed Cache, cron and the PHP fallback

The LiteSpeed Cache plugin lets the web server answer from its cache without running PHP. The server still writes those requests to the access log, so Pagereckon counts them when it reads the log.

However, the PHP request log works differently. It only sees requests that reach WordPress, so cached pages and the bots that get them are missing. Use that fallback only when the host hides the log, and expect lower numbers.

For steady updates, add a server cron:

Server cron
*/5 * * * * wp --path=/var/www/example.com pagereckon ingest --max-seconds=240

Behind Cloudflare or another proxy, read the Cloudflare guide as well, so the log keeps real visitor IPs.

LiteSpeed questions

Does Pagereckon count pages served by LiteSpeed Cache?

Yes, in server log mode. The web server writes cached hits to the access log too. In PHP request log mode, cached pages are missing.

Where is the OpenLiteSpeed access log by default?

The docs example uses $SERVER_ROOT/logs/access.log, which is /usr/local/lsws/logs/access.log on a default install.

How does OpenLiteSpeed show real IPs behind a proxy?

Set Use Client IP in Header to Trusted IP Only, then add the proxy ranges to the allowed list with a T after each one.

Sources and references

Free plugin, optional Pro

See your own AI traffic in ten minutes

Install the free plugin, point it at your access log and read today's humans, bots and AI visits. Then add Pro when you want Search Console and the before and after reports.