Posted by: ipsita mishra on: October 15, 2007
It’s simple.
Though this article is not well organized still if you simply follow these steps while running AWSTATS setup, it will definitely help you.
1. First download awstats-6.7.tar.gz from http://awstats.sourceforge.net/
2. Untar the file, rename the folder to “awstats” and ideally keep it in the path /usr/local/.
3. Now all files are at /usr/local/awstats path.
4. Now to configure awstats , you have to run the script awstats_configure.pl which is there in the path /usr/local/awstats/tools .
i> In the process of configuraion it will ask for the host name for which you want the Advanced Web Statistics. (AWSTATS) . i.e. if you are doing it for your local websites , then mention “localhost”. If you have your site on a server , mention something like “202.111.234.66″ or “www.dreamland.com” .
ii> During configuraion it will show a message like ”
Sorry, configure.pl does not support automatic add to cron yet.
You can do it manually by adding the following command to your cron:
/usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=202.190.199.23
Or if you have several config files and prefer having only one command:
/usr/local/awstats/tools/awstats_updateall.pl now
Press ENTER to continue…“
Just continue, you will fix the cron setup later on , after this configuration is complete. *
iii> At last you will get a message like , “A SIMPLE config file has been created: /etc/awstats/awstats.202.111.234.66.conf
You should have a look inside to check and change manually main parameters.
You can then manually update your statistics for ‘202.111.234.66‘ with command:
> perl awstats.pl -update -config=202.111.234.66
You can also read your statistics for ‘202.111.234.66‘ with URL:
> http://localhost/awstats/awstats.pl?config=202.111.234.66
Press ENTER to finish…“
Press Enter it’s completed.
iv> It creates a configuration file like awstats.yoursitename.conf (awstats.localhost.conf or awstats.202.111.234.66.conf or awstats.www.dreamland.com.conf) . DURING CONFIGURAION PROCESS IT WILL ASK YOU TO SPECIFY THE PATH WHERE THIS FILE WILL BE CREATED. So , what ever path you mention for this, just note down the path (for example , you can enter /home/john/). Now go to /home/john and open the awstats.yoursitename.conf file in an editor. (It takes the default path /etc/awstats/)
Most importantly, Enter valid values in these fields.
LogFile=”/var/log/apache2/access.log” [This is your apache server's logfile path.]
LogFormat=1 (‘1′ is the default value, The log format for 1 is mentioned there in this file. Check if your access.log file in in proper format) I will explain this point again. **
SiteDomain=”localhost” (I explained this point already.)
DirData=”/home/ipsita/awstats” (in this case I have created this awstats directory in the home path. Here a text file of the updates will be stored. You can give any path as per your convenience. When AWStats updates its statistics, it stores results of its analysis in these files.)
DON’T EDIT ANY OTHER FIELD IN THIS awstats.yoursitename.conf file.
For CRON set up refer to this link.
Recent Comments