New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

[Tutorial] integrating Awstats in Centos Web Panel

Started by bullten, August 30, 2018, 11:10:08 AM

Previous topic - Next topic

bullten

Below is tutorial to install and access awstats in cwp

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

jeniha

I use this tutorial, but stats wont update.
Last update: never update, shows on top of page.

bullten

You need to add cronjob as mentioned in tutorial.

jeniha

Yes i used this: crontab -l | { cat; echo "* * * * * /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=cwp"; } | crontab -

bullten

what did you choose domain when you were installing awstats?

what is output of crontab -l

jeniha

#5
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)

bullten

yes you need to change with the domain name you choose while installing awstats

jeniha

#7
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.


jeniha

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

bullten

What is output of

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

jeniha

# "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

bullten

Run the commands below

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 -

jeniha

Its same when open http://localip/awstats/awstats.pl?month=04&year=2018&output=main&config=www.salespc.net&framename=index
No updates

bullten

Well then what is output of

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