• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

8.3 Kill awstats

A

adamluz

Guest
Okay, so upgraded to 8.3 and awstats died on me...

When I load the index page I get

Forbidden
You don't have permission to access /plesk-stat/webstat/current/index.html on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.


------
I do not require authentication to view this page....
 
try to recalculate the statistics for this domain with
/usr/local/psa/admin/sbin/statistics --calculate-one --domain-name=domain.com
 
Tried that. Results:

[root@akiracreativegroup ~]# /usr/local/psa/admin/sbin/statistics --calculate-one --domain-name=akiragraphics. com
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/aws tats/awstats.pl -configdir=/usr/local/psa/etc/awstats -config=akiragraphics.com-http -dir=/var/www/vhosts/akir agraphics.com/statistics/webstat/current

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

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/aws tats/awstats.pl -configdir=/usr/local/psa/etc/awstats -config=akiragraphics.com-https -dir=/var/www/vhosts/aki ragraphics.com/statistics/webstat-ssl/current

System error 2: No such file or directory
statistics: Unable to execute /usr/share/awstats/awstats_buildstaticpages.pl -awstatsprog=/var/www/cgi-bin/aws tats/awstats.pl -configdir=/usr/local/psa/etc/awstats -config=akiragraphics.com-https -dir=/var/www/vhosts/aki ragraphics.com/statistics/webstat-ssl/current

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/aws tats/awstats.pl -configdir=/usr/local/psa/etc/awstats -config=akiragraphics.com-anon_ftp -dir=/var/www/vhosts/ akiragraphics.com/statistics/anon_ftpstat/current

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

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/aws tats/awstats.pl -configdir=/usr/local/psa/etc/awstats -config=akiragraphics.com-ftp -dir=/var/www/vhosts/akira graphics.com/statistics/ftpstat/current

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

System error 2: No such file or directory
 
Check the path to awstats binary indicated in /etc/psa/psa.conf. Here's mine configuration:
# cat /etc/psa/psa.conf | grep AWSTAT
AWSTATS_ETC_D /etc/awstats
AWSTATS_BIN_D /var/www/cgi-bin/awstats
AWSTATS_TOOLS_D /usr/share/awstats
AWSTATS_DOC_D /var/www/html/awstats

The binaries should exist there of course. If the binaries are elsewhere it is possible to change the paths in the file and try to run the utility again.
 
hi there,

after the 8.3.0 update I now get odd results too when checking awstat statistics via web. It remains in the initial state forever, stating that stats are processed every 24hours only and that statistics probably have not been collected once yet.

Running this:
/usr/local/psa/admin/sbin/statistics --calculate-one --domain-name=<mydomain.com>

logs quite some lines filled with errors. Looks different from whats been mentioned above though.

The output begins like this:

Error: Couldn't open config file "awstats.<mydomain.com>.-http.conf" nor "awstats.conf" after searching in path "/usr/local/psa/etc/awstats": Datei oder Verzeichnis nicht gefunden.
(where the german part means "file not found".)

and well the path where it looks for some domain-related configuration does exist but its empty. The only configuration files I found are located in "/etc/awstats/" and those look more like templates.

So I isuppose I have to follow the hint thats given in the statistics' output and
try "awstats_configure.pl" ?

If there would be a clean way to force plesk to redo the awstats-configuration, I'd rather go that way though.

thanks in advance
 
okay I lost my reply due to session log out :(

But I reckon I solved my problem.

Firstly, I dropped the "awstats_configure.pl" approach immediately, as it started to manipulate apache and plesks "httpd.conf".

I found the plesk psa statistics manager here:
/usr/local/psa/admin/bin/webstatmng

Exectued it with these options

/usr/local/psa/admin/bin/webstatmng --set-configs --stat-prog=awstats --domain-name=<mydomain.com>

Running it gave lots of problems. But they all went down to the fact that it needed
a file named "/etc/awstats/awstats.model.conf", which doesnt exist at "/etc/awstats/".
it tried to translate that file into these four:
/usr/local/psa/etc/awstats/awstats.<mydomain.com>-ftp.conf
/usr/local/psa/etc/awstats/awstats.<mydomain.com>-http.conf
/usr/local/psa/etc/awstats/awstats.<mydomain.com>-https.conf
/usr/local/psa/etc/awstats/awstats.<mydomain.com>-anon_ftp.conf


But in "/etc/awstats/" are three other files named "awstats.conf.ftp", "awstats.conf.smtp" "awstats.conf.web". I looked into those, noticed they are more like templates and roughly the same. Their character also isnt just defined by the file extension but by an option inside.

So first of all I did a backup.

Then copied one of the existing files and renamed it to look like the file the "webstatmng" needed, hoping that it wasnt more than a name based confusion.
cp /etc/awstats/awstats.conf.web /etc/awstats/awstats.model.conf

Ran "webstatmng" just like above again. and no complaints or well no output at all. All four files it couldnt create before existed and looked ok.

So fingers crossed, tried to recalculate statistics
/usr/local/psa/admin/sbin/statistics --calculate-one --domain-name=<mydomain.com>

And well, it worked. Some complaints about non-existing subdirectories in the domains statistics folder.

To be safe, I reset statistics to "none" via plesk control panel and then back to "awstats".
checked the web presentation and it looked ok, all statistics zero but well.
Accessed my domain, ran "/usr/local/psa/admin/sbin/statistics " with same options again.
It showed no more directory related errors, noticed the change in the access log.
And the statistics web presentation registered my access to the site.

Guess karma was on my side so far :)

Regards.
 
Back
Top