• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

AWStats Questions ??

E

energylevel

Guest
I installed 8.1 ... seems to be OK, just a few issues/questions about AWStats

The icons folder wasn't copied to each domain so all the images were missing in the AWStats output.

Has anyone setup and got working the GEOIP option

Is there a per domain config file to set the AWStats options ?
 
ha! looks like swsoft did a great job again at testing its product before releasing it!
 
The CP links call up a stats page.

It does change between selecting awstats and webalizer, if you look closely the first option (Web Statistics Preferences) gets ghosted out when you run awstats.

All I can guess is you have to wait until the stats run and hopefully it will all update.

I seem to recall this happened once to me when I was hosting my site with a company until I got my own server.

I changed from webalizer to awstats and I got a 'wait 24h' same page.

But the next day when I was about to put in a ticket the traffic reports were there.

At this stage best guess is wait, unless swsoft tell us how to force an awstats update through shell...
 
well, i havent installed 8.1 yet, but i guess you just need to look at the crontab to find out what command to issue to awstats...
 
I've got the stats it updated for the fist time at 5.00 am today ...... just no images/icons displayed on the AWStats output .........
 
A quick fix I've put together:

1. Create a file /etc/httpd/conf.d/awstats.conf

2. Add the following line:

Alias /icon /var/www/html/awstats/icon

3. Restart apache with 'service httpd restart'
 
By the way, you can force a stats run using the following command:

/usr/local/psa/admin/sbin/statistics
 
projectandrew that worked a treat ... you haven't by any chance tried to get the GEOPIP plugin working for country stats using the Maxmind database have you ?? I've been fiddling about but can't get it working ......
 
Originally posted by energylevel

Is there a per domain config file to set the AWStats options ?
vfr55a:/root# ls /usr/local/psa/etc/awstats/*
awstats.dom01.com-anon_ftp.conf
awstats.dom01.com-ftp.conf
awstats.dom01.com-http.conf
awstats.dom01.com-https.conf
 
I can see the awstats directories and the files for all my domains on the server, but its still not working...

This is the placeholder for Web statistics. If you see this page, that means that statistics for your server was not gathered yet, or bandwidth was not used. Statistics is typically set to run once every 24 hours. If you do not see a change to this page in the next 24 hours contact your server administrator for assistance.

This page has been automatically generated by Plesk.

____

The title says Placeholder for webalizer :(

Where are the output files written? Its it the same /var/www/vhosts/domainname/statistics/
anon_ftpstat ftpsta ftpstat logs webstat webstat-ssl

If it is then awstats is not running as its still got he 24h pages generated by webalizer....

Cheers,

David
 
Okay I think I am getting to the bottom of it.

When I run:
/usr/local/psa/admin/sbin/statistics

I get a bunch of errors per domain..

I have taken one domain...

System error 2: No such file or directory
sh: /var/www/cgi-bin/awstats/awstats.pl: No such file or directory
sh: /usr/share/awstats/awstats_buildstaticpages.pl: No such file or directory
statistics: Unable to execute /usr/share/awstats/awstats_buildstaticpages.pl -awstatsprog=/var/www/cgi-bin/awstats/awstats.pl -configdir=/usr/local/psa/etc/awstats -config=domain-http -dir=/var/www/vhosts/domain/statistics/webstat/

System error 32: Broken pipe
statistics: Unable to execute /usr/share/awstats/awstats_buildstaticpages.pl -awstatsprog=/var/www/cgi-bin/awstats/awstats.pl -configdir=/usr/local/psa/etc/awstats -config=domain-http -dir=/var/www/vhosts/domain/statistics/webstat/

System error 32: Broken pipe
sh: /var/www/cgi-bin/awstats/awstats.pl: No such file or directory
sh: /usr/share/awstats/awstats_buildstaticpages.pl: No such file or directory
statistics: Unable to execute /usr/share/awstats/awstats_buildstaticpages.pl -awstatsprog=/var/www/cgi-bin/awstats/awstats.pl -configdir=/usr/local/psa/etc/awstats -config=domain-https -dir=/var/www/vhosts/domain/statistics/webstat-ssl/

System error 32: Broken pipe
statistics: Unable to execute /usr/share/awstats/awstats_buildstaticpages.pl -awstatsprog=/var/www/cgi-bin/awstats/awstats.pl -configdir=/usr/local/psa/etc/awstats -config=domain-https -dir=/var/www/vhosts/domain/statistics/webstat-ssl/

System error 32: Broken pipe
sh: /var/www/cgi-bin/awstats/awstats.pl: No such file or directory
sh: /usr/share/awstats/awstats_buildstaticpages.pl: No such file or directory
statistics: Unable to execute /usr/share/awstats/awstats_buildstaticpages.pl -awstatsprog=/var/www/cgi-bin/awstats/awstats.pl -configdir=/usr/local/psa/etc/awstats -config=domain-anon_ftp -dir=/var/www/vhosts/domain/statistics/anon_ftpstat/

System error 2: No such file or directory
statistics: Unable to execute /usr/share/awstats/awstats_buildstaticpages.pl -awstatsprog=/var/www/cgi-bin/awstats/awstats.pl -configdir=/usr/local/psa/etc/awstats -config=domain-anon_ftp -dir=/var/www/vhosts/domain/statistics/anon_ftpstat/

System error 2: No such file or directory
sh: /var/www/cgi-bin/awstats/awstats.pl: No such file or directory
sh: /usr/share/awstats/awstats_buildstaticpages.pl: No such file or directory
statistics: Unable to execute /usr/share/awstats/awstats_buildstaticpages.pl -awstatsprog=/var/www/cgi-bin/awstats/awstats.pl -configdir=/usr/local/psa/etc/awstats -config=domain-ftp -dir=/var/www/vhosts/domain/statistics/ftpstat/

System error 17: File exists
statistics: Unable to execute /usr/share/awstats/awstats_buildstaticpages.pl -awstatsprog=/var/www/cgi-bin/awstats/awstats.pl -configdir=/usr/local/psa/etc/awstats -config=domain-ftp -dir=/var/www/vhosts/domain/statistics/ftpstat/

System error 17: File exists



Okay if you want:
awstats_buildstaticpages.pl

Its located:
/usr/share/awstats/tools/awstats_buildstaticpages.pl

NOT

/usr/share/awstats/awstats_buildstaticpages.pl


Next

awstats.pl

Its located:
/usr/share/awstats/wwwroot/cgi-bin/awstats.pl

NOT
/var/www/cgi-bin/awstats/awstats.pl

______________________

So when you run:
/usr/local/psa/admin/sbin/statistics

What file is being accessed looking for these paths? It needs to be changed then awstats will run.
 
After no help from support apart from them telling me to buy a support incident, I have found a temporary fix.

TEMPORARY FIX:

Login as root...

cd /usr/share/awstats
ln -s /usr/share/awstats/tools/awstats_buildstaticpages.pl awstats_buildstaticpages.pl

cd /var/www/cgi-bin
mkdir awstats
cd awstats
ln -s /usr/share/awstats/wwwroot/cgi-bin/awstats.pl awstats.pl

This makes symlinks and fixes up Plesk's statistics binary from bombing out as when it looks up the wrong paths to awstats_buildstaticpages.pl and awstats.pl the symlinks created about point it to the correct place.

Enjoy!
 
Originally posted by projectandrew
A quick fix I've put together:

1. Create a file /etc/httpd/conf.d/awstats.conf

2. Add the following line:

Alias /icon /var/www/html/awstats/icon

3. Restart apache with 'service httpd restart'


Hmm I havent got a httpd folder, and if I put it in /etc/apache2/conf.d/ it doesnt have any effect. (on debian 3.1)
 
If you have slocate installed, you can do a 'locate zz010_psa_httpd.conf' - the awstats.conf needs to go in the same folder as this file.
 
I did but it didnt work. I added the line to the file you just mentioned and that works fine.
 
Problem Resolutions and GoeIP install

Hi all,

I had the same problems as you, but I've manage to resolve them, so here is what I did:
I use FC2.
-- First the Icon problem.
The resolution is of 2 parts:
1. Locate the file: /etc/awstats/awstats.model.conf and edit the line: DirIcons="/icon" then change it to DirIcons="/awstats/icon" or whatever you like.
This file is used as template when createing the users awstats.conf files.
Please note that after you edit this file you have to go over you clients and change the stats to webalizer and back to awstats so the file can be updated.
2. go in you httpd/conf.d dir and add a file awstats.conf. In the file put Alias /awstats /var/www/html/awstats and restart the server.

This shold fix the icons problem. However you may have to wait till the stats are generated again or run /usr/local/psa/admin/sbin/statistics

-- Installing GeoIP.
Editing the awstats.model.conf is also how you install modules to awstats like GeoIP. However you must install the required conponents for GeoIP. http://www.maxmind.com/app/perl?rId=awstats this might help :). Till I installed Geo::IP::purePerl Module I wasn't able to use GeoIP.
Remember to recreate the users conf files before testing.

-- Running awstats dynamic with frames.
I've migrated a clients that was used to dynamic awstats with frames. So i had to add this also ...
To achive this we:
1. in httpd/conf.d/awstats.conf add some rewrite rules so when a client hits /cgi-bin/awstats/awstats.pl without a config param it puts the write param. The rerules also makes sure that it addes -http in the end of the config file, because this is how plesk generates the files:
Code:
  <IfModule mod_rewrite.c>
    <Directory /var/www/cgi-bin/awstats>
        Options ExecCGI FollowSymLinks
        Order allow,deny
        Allow from all

        RewriteEngine on

        RewriteCond %{QUERY_STRING} !config=
        RewriteRule ^awstats.pl(.*)$ /cgi-bin/awstats/awstats.pl\?config=%{HTTP_HOST}-http [QSA,R,L]

        RewriteCond %{QUERY_STRING} !config=[a-zA-Z\.-]+-[a-z]
        RewriteCond %{QUERY_STRING} (.*)config=[^&]*(.*)
        RewriteRule ^awstats.pl(.*)$ /cgi-bin/awstats/awstats.pl\?%1config=%{HTTP_HOST}-http%2 [R,L]

        #RewriteCond %{QUERY_STRING} config=www\.[a-zA-Z\.-]
        RewriteCond %{QUERY_STRING} (.*)config=www\.(.*)
        RewriteRule ^awstats.pl(.*)$ /cgi-bin/awstats/awstats.pl\?%1config=%2 [R,L]

    </Directory>
  </IfModule>
now in order for awstats to finds the files my must make them avaliable.
Go to:/usr/local/etc/ and make symlink to: /usr/local/psa/etc/awstats/ in there ... then move the file /etc/awstats/awstats.conf to /usr/local/psa/etc/awstats/

We need this last step because according to the manual when it is invoked awstats searches for config files in /etc/awstats then /use/local/etc/awstats. However it stops the search when it finds the general config file awstats.conf.
Plesk on the other hand generates the files in /usr/local/psa/etc/awstats/. So we make a simple hack to simulate /use/local/etc/awstats and make awstats find the generated files by plesk.
So to be sure we have this correctly we must check that:
1. /etc/awstats directory does NOT contain the file awstats.conf
2. when we make ls -la /usr/local/etc/awstats/ we see the files generated by plesk (4 for each domain) and awstats.conf

This did the trick for me ... I hoped I've been useful to someone.
 
When I run this command, it create stats for ALL the domains hosted in my server.
How can I do to create the stats only for the domain I am interested.


Originally posted by projectandrew
By the way, you can force a stats run using the following command:

/usr/local/psa/admin/sbin/statistics
 
Code:
/usr/local/psa/admin/sbin/statistics --help
Usage: statistics [OPTIONS]...

  Without options - calculate statistics for all domains
  --calculate-all
        calculate statistics for all domains
  --calculate-one --domain-name=<domain_name>
        calculate statistics for <domain_name>
  -h, --help
        display this help and exit

Originally posted by albatroz
When I run this command, it create stats for ALL the domains hosted in my server.
How can I do to create the stats only for the domain I am interested.
 
Back
Top