1

Is it possible to install AWstats log analyzer in OpenLiteSpeed?

I cannot find the lsws/admin/misc/awstats_install.sh script from this 2015 documentation: https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:config:awstats

So I installed AWstats manually using sudo apt install awstats on my Ubuntu droplet, but I am missing the link on how to bring the charts in OpenLiteSpeed WebAdmin.

Thanks

BinaryMonkey
  • 331
  • 1
  • 13

1 Answers1

1

I just did a rough set up, and manually setup AwStats seems to work on my OpenLiteSpeed web server.

  1. Install AwStats sudo apt install awstats which you already did.
  2. Set up the AwStats config. Please add following entries to /etc/awstats/awstats.conf:
  • Include "/etc/awstats/awstats.conf.local"
  • LogFile="/var/www/html/logs/access.log"
  • SiteDomain="example.com"
  • HostAliases="example.com localhost 127.0.0.1"
  • AllowToUpdateStatsFromBrowser=1

Note, please make sure to substitute the example.com domain name and the access log path with your own settings.

  1. Verify your AwStats settings

Build your initial statistics which is generated from the current logs,

/usr/lib/cgi-bin/awstats.pl -config=example.com -update

Example returns:

From data in log file "/var/www/html/logs/access.log"...
Phase 1 : First bypass old records, searching new record...
Direct access after last parsed record (after line 50)
Jumped lines in file: 50
Found 50 already parsed records.
Parsed lines in file: 146
Found 0 dropped records,
Found 0 comments,
Found 0 blank records,
Found 0 corrupted records,
Found 0 old records,
Found 146 new qualified records.

If there's no error in the output, we can start setting up the Awstats display

  1. Display Awstats

Add symlink for both cgi-bin and icons to your document root

ln -sf /usr/lib/cgi-bin /var/www/html/cgi-bin

ln -sf /usr/share/awstats/icon/* /var/www/html/awstats-icon

Navigate to Web Admin at port 7080 > VirtualHosts > Name > Context, then create a CGI context

  • URI=/cgi-bin/
  • Path=/var/www/html/cgi-bin

Click Save button and gracefully restart the web server.

Now you can access your AwStats by visiting the URL, http://your-server-ip/cgi-bin/awstats.pl?config=example.com

awstats

Eric
  • 732
  • 4
  • 13