AWSTATS All-Stats

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,806
Location
A Coruña, Spain
Hi everyone,

ive noticed today that awstats is correctly showing past month, present month.. but, if i select all month it load a white page, any hint i should check or how to fix?

Thanks
 
Hello,

1) Try adding the /awstats link in apache to see if it throws any errors using that method. (done via DA's stats page)

2) You could also try running it by hand in ssh.. it won't "work" in that a lot of the environmental variables are missing, however it may throw some preliminary linking/include errors, if that's the problem.
Code:
su - [b]username[/b]
cd /home/[b]username[/b]/domains/[b]domain.com[/b]/awstats
./awstats.pl
on a working box, it will show the --help page.

3) Next option:
Code:
cd /home/[b]username[/b]/domains/[b]domain.com[/b]/awstats
rm -f .htaccess awstats.pl .data/awstats.[b]domain.com[/b].conf
cd /usr/local/directadmin/scripts
./awstats_process.sh [b]username domain.com[/b]
John
 
Hi John,

first, thanks for the reply and time spent for the post.

1) /awstats reply with an internal server error

2)
Code:
-rw-r--r-- 1 admin admin 611K  9 feb 16:36 awstats.pl
>./awstats
bash: ./awstats: No such file or directory
>perl awstats.pl
----- awstats 6.95 (build 1.943) (c) 2000-2009 Laurent Destailleur -----
AWStats is a free web server logfile analyzer to show you advanced web
statistics.
AWStats comes with ABSOLUTELY NO WARRANTY. It's a free software distributed
with a GNU General Public License (See LICENSE file for details).

Syntax: awstats.pl -config=virtualhostname [options]

  This runs awstats in command line to update statistics (-update option) of a
   web site, from the log file defined in AWStats config file, or build a HTML
   report (-output option).
  First, awstats tries to read awstats.virtualhostname.conf as the config file.
  If not found, awstats tries to read awstats.conf
  Note 1: Config files (awstats.virtualhostname.conf or awstats.conf) must be
   in /etc/awstats, /usr/local/etc/awstats, /etc or same directory than
   awstats.pl script file.
  Note 2: If AWSTATS_FORCE_CONFIG environment variable is defined, AWStats will
   use it as the "config" value, whatever is the value on command line or URL.
   See AWStats documentation for all setup instrutions.

Options to update statistics:
  -update        to update statistics (default)
  -showsteps     to add benchmark information every 8192 lines processed
  -showcorrupted to add output for each corrupted lines found, with reason
  -showdropped   to add output for each dropped lines found, with reason
  -showunknownorigin  to output referer when it can't be parsed
  -showdirectorigin   to output log line when origin is a direct access
  -updatefor=n   to stop the update process after parsing n lines
  -LogFile=x     to change log to analyze whatever is 'LogFile' in config file
  Be care to process log files in chronological order when updating statistics.

Options to show statistics:
  -output      to output main HTML report (no update made except with -update)
  -output=x    to output other report pages where x is:
               alldomains       to build page of all domains/countries
               allhosts         to build page of all hosts
               lasthosts        to build page of last hits for hosts
               unknownip        to build page of all unresolved IP
               allemails        to build page of all email senders (maillog)
               lastemails       to build page of last email senders (maillog)
               allemailr        to build page of all email receivers (maillog)
               lastemailr       to build page of last email receivers (maillog)
               alllogins        to build page of all logins used
               lastlogins       to build page of last hits for logins
               allrobots        to build page of all robots/spider visits
               lastrobots       to build page of last hits for robots
               urldetail        to list most often viewed pages
               urldetail:filter to list most often viewed pages matching filter
               urlentry         to list entry pages
               urlentry:filter  to list entry pages matching filter
               urlexit          to list exit pages
               urlexit:filter   to list exit pages matching filter
               osdetail         to build page with os detailed versions
               browserdetail    to build page with browsers detailed versions
               unknownbrowser   to list 'User Agents' with unknown browser
               unknownos        to list 'User Agents' with unknown OS
               refererse        to build page of all refering search engines
               refererpages     to build page of all refering pages
               keyphrases       to list all keyphrases used on search engines
               keywords         to list all keywords used on search engines
               errors404        to list 'Referers' for 404 errors
               allextraX        to build page of all values for ExtraSection X
  -staticlinks to have static links in HTML report page
  -staticlinksext=xxx to have static links with .xxx extension instead of .html
  -lang=LL     to output a HTML report in language LL (en,de,es,fr,it,nl,...)
  -month=MM    to output a HTML report for an old month MM
  -year=YYYY   to output a HTML report for an old year YYYY
  Those 'date' options doesn't allow you to process old log file. They only
  allow you to see a past report for a chosen month/year period instead of
  current month/year.

Other options:
  -debug=X     to add debug informations lesser than level X (speed reduced)

Now supports/detects:
  Web/Ftp/Mail/streaming server log analyzis (and load balanced log files)
  Reverse DNS lookup (IPv4 and IPv6) and GeoIP lookup
  Number of visits, number of unique visitors
  Visits duration and list of last visits
  Authenticated users
  Days of week and rush hours
  Hosts list and unresolved IP addresses list
  Most viewed, entry and exit pages
  Files type and Web compression (mod_gzip, mod_deflate stats)
  Screen size
  Ratio of Browsers with support of: Java, Flash, RealG2 reader,
                        Quicktime reader, WMA reader, PDF reader
  Configurable personalized reports
  274 domains/countries
  642 robots
  5 worm's families
  71 operating systems
  208 browsers (592 with phone browsers database)
  228 search engines (and keyphrases/keywords used from them)
  All HTTP errors with last referrer
  Report by day/month/year
  Dynamic or static HTML or XHTML reports, static PDF reports
  Indexed text or XML monthly database
  And a lot of other advanced features and options...
New versions and FAQ at http://awstats.sourceforge.net

3) Worked perfectly, but, this is happening to every user every domain.. there is a faster way to perform this for everyone and everydomain? (PS. now /awstats work aswell)

Thanks a lot
 
Last edited:
Noticed that now /home/username/domains/domain.com/awstats/awstats.pl have +x permission (that from latest post didnt had).

does this would work?

Code:
chmod +x /home/*/domains/*/awstats/awstats.pl
?

Thanks
 
1) /awstats reply with an internal server error
there might be more info as to exactly why that's happening in the Apache errors logs for the domain.

3) The full tally will re-create the files, so all you'd need to do is delete them. If you wanted, this should work (double check the syntax 3 times, as one typo could end poorly):
Code:
cd /home
rm -f */domains/*/awstats/.htaccess
rm -f */domains/*/awstats/awstats.pl
rm -f */domains/*/awstats/.data/awstats.*.conf
echo "action=tally&value=all" >> /usr/local/directadmin/data/task.queue
John
 
Just a suggesiton,

should be added a task on awstats update that restore the +x on awstats.pl? Should fix the problem automatically on next tally if appear again for any reason.

Regards
 
Sure, I've added:
Code:
chmod 755 ${STATS_DIR}/awstats.pl
to the awstats_process.sh, available for the next release.
It's added after the section:
Code:
if [ ! -e "${STATS_DIR}/awstats.pl}" ]; then
   ...
fi
so it will be run each time awstats_process.sh is run (assuming ADD_CGI=1 is set)

John
 
I got this error when accessing a page from awstats.
[Mon May 14 14:06:11.599302 2012] [cgi:error] [pid 26952] [client 82.176.xx.xxx:50830] AH01215: (13)Permission denied: exec of '/home/kicken/domains/xxxxxx.fm/public_html/awstats/awstats.pl' failed
[Mon May 14 14:06:11.602194 2012] [cgi:error] [pid 26952] [client 82.176.xx.xxx:50830] End of script output before headers: awstats.pl
And a internal service error 500 Did rewrite everything with above commands.
I am running apache with mod_ruid2
 
-rwx---r-x 2 root apache 19200 Jun 13 2011 perl
-rwx---r-x 2 root apache 19200 Jun 13 2011 perl5.8.8
Are the permissions now
 
Ive just noticed the path, from directadmin panel is awstats working?

Check a past month, present and all months value and tell which one doesnt work

Regards
 
Please post the output of those commands:

Code:
ls -l /home/kicken/domains/xxxxxx.fm/public_html/
ls -l /home/kicken/domains/xxxxxx.fm/

Regards
 
Tis is the outcome of the dir lists

ls -l /home/kicken/domains/xxxxxx.fm/

drwxr-xr-x 5 kicken kicken 69632 May 15 10:30 awstats
-rw-r--r-- 1 kicken kicken 87200 Nov 23 2005 awstats.myvirtualhostname.html
-rw-r--r-- 1 kicken kicken 644947 Jan 24 2006 bbclone-0[1].4.6e.tar.gz
-rw-r--r-- 1 kicken kicken 824 Nov 26 2008 favicon.ico
drwxr-xr-x 2 kicken kicken 4096 May 15 10:30 logs
drwxr-xr-x 4 kicken kicken 4096 Dec 25 2010 private_html
drwx--x--x 3 kicken kicken 4096 Sep 10 2005 public_ftp
drwxr-xr-x 572 kicken kicken 24576 May 11 23:53 public_html
drwxr-xr-x 4 root root 12288 Dec 25 2010 stats
[root@server02 awstats]#

ls -l /home/kicken/domains/xxxxxx.fm/public_html/
total 751968
lrwxrwxrwx 1 kicken kicken 10 May 11 23:53 awstats -> ../awstats
 
Last edited by a moderator:
Ive edited your post for a better reading.

Those seems ok except for stats folder that should be user:user so do:

Code:
chown kicken:kicken /home/kicken/domains/xxxxxx.fm/stats

also try tun this:

Code:
cd /home/kicken/domains/xxxxxx.fm/awstats
rm -f .htaccess awstats.pl .data/awstats.xxxxxx.fm.conf
cd /usr/local/directadmin/scripts
./awstats_process.sh kicken xxxxxx.fm

Regards
 
Back
Top