Author Topic: [Tutorial] integrating Awstats in Centos Web Panel  (Read 960 times)

0 Members and 1 Guest are viewing this topic.

Offline
****
[Tutorial] integrating Awstats in Centos Web Panel
« on: August 30, 2018, 11:10:08 AM »
Below is tutorial to install and access awstats in cwp

Code: [Select]
https://panel.bullten.net/knowledgebase/71/Adding-and-integrating-Awstats-in-CWP--Centos-6or7.html

Offline
**
Re: [Tutorial] integrating Awstats in Centos Web Panel
« Reply #1 on: August 31, 2018, 06:44:03 AM »
I use this tutorial, but stats wont update.
Last update: never update, shows on top of page.

Offline
****
Re: [Tutorial] integrating Awstats in Centos Web Panel
« Reply #2 on: August 31, 2018, 07:56:40 AM »
You need to add cronjob as mentioned in tutorial.

Offline
**
Re: [Tutorial] integrating Awstats in Centos Web Panel
« Reply #3 on: August 31, 2018, 08:20:30 AM »
Yes i used this: crontab -l | { cat; echo "* * * * * /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=cwp"; } | crontab -

Offline
****
Re: [Tutorial] integrating Awstats in Centos Web Panel
« Reply #4 on: August 31, 2018, 12:33:56 PM »
what did you choose domain when you were installing awstats?

what is output of crontab -l

Offline
**
Re: [Tutorial] integrating Awstats in Centos Web Panel
« Reply #5 on: August 31, 2018, 12:49:42 PM »
31 0 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh/cwp_certs" > /                                                                                                                                                                                                                                             dev/null
05 01 * * * /usr/local/cwp/php71/bin/php /usr/local/cwpsrv/htdocs/resources/admi                                                                                                                                                                                                                                             n/include/alertandautorenewssl.php
* * * * * /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=cwp
* * * * * /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=cwp
* * * * * /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=cwp
* * * * * /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=cwp

I do all step from tutorial copy paste..
Did i need to change "cwp" with my domain(www.domain.com)
« Last Edit: August 31, 2018, 12:54:47 PM by jeniha »

Offline
****
Re: [Tutorial] integrating Awstats in Centos Web Panel
« Reply #6 on: August 31, 2018, 12:56:02 PM »
yes you need to change with the domain name you choose while installing awstats

Offline
**
Re: [Tutorial] integrating Awstats in Centos Web Panel
« Reply #7 on: August 31, 2018, 12:58:48 PM »
I use command perl tools/awstats_configure.pl again and add domain on line Your web site, virtual server or profile name: www.domain.com
But i still dont have updates.
« Last Edit: August 31, 2018, 01:06:04 PM by jeniha »

Offline
****
Re: [Tutorial] integrating Awstats in Centos Web Panel
« Reply #8 on: August 31, 2018, 01:01:13 PM »
what is output of
ls -lah /etc/awstats/

Offline
**
Re: [Tutorial] integrating Awstats in Centos Web Panel
« Reply #9 on: August 31, 2018, 01:05:16 PM »
total 140K
drwxr-xr-x   2 root root   66 Aug 31 15:51 .
drwxr-xr-x. 89 root root 8.0K Aug 30 16:36 ..
-rw-r--r--   1 root root  63K Aug 31 11:38 awstats.cwp.conf
-rw-r--r--   1 root root  63K Aug 31 15:51 awstats.www.salespc.net.conf

Offline
****
Re: [Tutorial] integrating Awstats in Centos Web Panel
« Reply #10 on: August 31, 2018, 01:06:42 PM »
What is output of

cat /etc/awstats/awstats.www.salespc.net.conf | grep LogFile

Offline
**
Re: [Tutorial] integrating Awstats in Centos Web Panel
« Reply #11 on: August 31, 2018, 01:09:59 PM »
# "LogFile" contains the web, ftp or mail server log file to analyze.
# Example: "C:/WINNT/system32/LogFiles/W3SVC1/ex%YY-24%MM-24%DD-24.log"
LogFile="/var/log/httpd/mylog.log"
PurgeLogFile=0
# When PurgeLogFile is setup to 1, AWStats will clean your log file after
# This parameter is not used if PurgeLogFile=0
# Possible values: 0, 1, or tags (See LogFile parameter) for suffix

Offline
****
Re: [Tutorial] integrating Awstats in Centos Web Panel
« Reply #12 on: August 31, 2018, 01:11:21 PM »
Run the commands below

Code: [Select]
sed -i 's|var/\log/\httpd/\mylog.log|usr\/local/apache/logs/access_log|g' /etc/awstats/awstats.www.salespc.net.conf
rm -rf /usr/local/apache/logs/access_log
service httpd restart
crontab -l | { cat; echo "* * * * * /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=www.salespc.net"; } | crontab -

Offline
**

Offline
****
Re: [Tutorial] integrating Awstats in Centos Web Panel
« Reply #14 on: August 31, 2018, 01:20:39 PM »
Well then what is output of

/usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=www.salespc.net