Here's what I've done, still unsure about the icons and the classes folder.
any one care to fill me in to some fixes, the awstats is running
Code:
tommytomato@localhost:~$ sudo apt-get install awstats
Quote:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
libnet-dns-perl libnet-ip-perl libgeo-ipfree-perl
The following NEW packages will be installed:
awstats
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 951kB of archives.
After this operation, 5,214kB of additional disk space will be used.
Get:1 http://au.archive.ubuntu.com karmic/main awstats 6.9~dfsg-1ubuntu3 [951kB]
Fetched 951kB in 20s (47.0kB/s)
Selecting previously deselected package awstats.
(Reading database ... 67895 files and directories currently installed.)
Unpacking awstats (from .../awstats_6.9~dfsg-1ubuntu3_all.deb) ...
Setting up awstats (6.9~dfsg-1ubuntu3) ...
|
Run as sudo not root
Code:
tommytomato@localhost:~$ sudo cp -R /usr/share/doc/awstats/examples /usr/local/awstats
Code:
tommytomato@localhost:~$ cd /usr/local/awstats
Code:
tommytomato@localhost:/usr/local/awstats$ sudo mkdir wwwroot
Code:
tommytomato@localhost:/usr/local/awstats$ sudo mkdir wwwroot/cgi-bin
Code:
tommytomato@localhost:/usr/local/awstats$ sudo gunzip awstats.model.conf.gz
Code:
tommytomato@localhost:/usr/local/awstats$ sudo mv awstats.model.conf wwwroot/cgi-bin
Now run the awstats configue file to update your records
Code:
tommytomato@localhost:/usr/local/awstats$ sudo ./awstats_configure.pl
Quote:
----- AWStats awstats_configure 1.0 (build 1.8) (c) Laurent Destailleur -----
This tool will help you to configure AWStats to analyze statistics for
one web server. You can try to use it to let it do all that is possible
in AWStats setup, however following the step by step manual setup
documentation (docs/index.html) is often a better idea. Above all if:
- You are not an administrator user,
- You want to analyze downloaded log files without web server,
- You want to analyze mail or ftp log files instead of web log files,
- You need to analyze load balanced servers log files,
- You want to 'understand' all possible ways to use AWStats...
Read the AWStats documentation (docs/index.html).
-----> Running OS detected: Linux, BSD or Unix
-----> Check for web server install
Enter full config file path of your Web server.
Example: /etc/httpd/httpd.conf
Example: /usr/local/apache2/conf/httpd.conf
Example: c:\Program files\apache group\apache\conf\httpd.conf
Config file path ('none' to skip web server setup):
|
Code:
> /etc/apache2/apache2.conf
Quote:
-----> Check and complete web server config file '/etc/apache2/apache2.conf'
Add 'Alias /awstatsclasses "/usr/local/awstats/wwwroot/classes/"'
Add 'Alias /awstatscss "/usr/local/awstats/wwwroot/css/"'
Add 'Alias /awstatsicons "/usr/local/awstats/wwwroot/icon/"'
Add 'ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/"'
Add '<Directory>' directive
AWStats directives added to Apache config file.
-----> Update model config file '/usr/local/awstats/wwwroot/cgi-bin/awstats.model.conf'
File awstats.model.conf updated.
-----> Need to create a new config file ?
Do you want me to build a new AWStats config/profile
file (required if first install) [y/N] ? y
-----> Define config file name to create
What is the name of your web site or profile analysis ?
Example: www.mysite.com
Example: demo
Your web site, virtual server or profile name:
> localhost.com
-----> Define config file path
In which directory do you plan to store your config file(s) ?
Default: /etc/awstats
Directory path to store config file(s) (Enter for default):
>
-----> Create config file '/etc/awstats/awstats.localhost.com.conf'
Config file /etc/awstats/awstats.localhost.com.conf created.
-----> Restart Web server with '/etc/init.d/apache restart'
-----> Add update process inside a scheduler
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=localhost.com
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...
A SIMPLE config file has been created: /etc/awstats/awstats.localhost.com.conf
You should have a look inside to check and change manually main parameters.
You can then manually update your statistics for 'localhost.com' with command:
> perl awstats.pl -update -config=localhost.com
You can also read your statistics for 'localhost.com' with URL:
> http://localhost/awstats/awstats.pl?...=localhost.com
Press ENTER to finish...
|
Code:
tommytomato@localhost:/usr/local/awstats$ sudo ln -s /usr/local/awstats/css/ wwwroot
Code:
tommytomato@localhost:/usr/local/awstats$ sudo ln -s /usr/local/awstats/css/* wwwroot/
Code:
tommytomato@localhost:/usr/local/awstats$ sudo ln -s /usr/lib/cgi-bin/awstats.pl wwwroot/cgi-bin/
Code:
tommytomato@localhost:/usr/local/awstats$ sudo chown -R www-data:www-data wwwroot
Code:
tommytomato@localhost:/usr/local/awstats$ sudo chown -R www-data:www-data /var/lib/awstats
Code:
tommytomato@localhost:/usr/local/awstats$ sudo chown root:www-data /var/log/apache2/access.log
Now edit the apache2 file /etc/apache2/apache2.conf
Code:
tommytomato@localhost:/usr/local/awstats$ sudo vim /etc/apache2/apache2.conf
<Directory "/usr/loacl/awstats/wwwroot">, and put a # in front of the line "Options None" it should look like:
Code:
<Directory "/usr/local/awstats/wwwroot">
# Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Code:
tommytomato@localhost:/usr/local/awstats$ sudo /etc/init.d/apache2 reload
Quote:
* Reloading web server config apache2 [ OK ]
|
Next Step
Code:
sudo /usr/lib/cgi-bin/awstats.pl -config=localhost.com -update
or
Code:
sudo perl /usr/local/awstats/awstats_updateall.pl now
You may get an error about the log file, you need to edit the file
Quote:
/etc/awstats/awstats.localhost.com.conf
|
Code:
sudo vim /etc/awstats/awstats.localhost.com.conf
change the file like so
Quote:
#LogFile="/var/log/httpd/mylog.log"
LogFile="/var/log/apache2/access.log"
|
Then run this command to update records
Code:
sudo /usr/local/awstats$ sudo /usr/lib/cgi-bin/awstats.pl -config=localhost.com -update
Quote:
Create/Update database for config "/etc/awstats/awstats.localhost.com.conf" by AWStats version 6.9 (build 1.925)
From data in log file "/var/log/apache2/access.log"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...
Jumped lines in file: 0
Parsed lines in file: 4249
Found 0 dropped records,
Found 0 corrupted records,
Found 0 old records,
Found 4249 new qualified records.
tommytomato@localhost:/usr/local/awstats$
|
My icons were not showing either so i had to copy the folder icons
from /usr/share/awstats to /usr/local/awstats/wwwroot/icon/
below is a sample of the paths apache2 needs for them to show
I also had to chmod to 0777 for them to show.
Code:
Alias /awstatsclasses "/usr/local/awstats/wwwroot/classes/"
Alias /awstatscss "/usr/local/awstats/wwwroot/css/"
Alias /awstatsicons "/usr/local/awstats/wwwroot/icon/"
ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/"
I wasn't to find "/usr/local/awstats/wwwroot/classes/" not on my system
want to remove the update link on your awstats page, you need to edit the awstats.localhost.com.conf file
/etc/awstats/awstats.localhost.com.conf
Code:
sudo vim /etc/awstats/awstats.localhost.com.conf
set the below to 0, if you want to be able to update via the browser set to 1
Code:
AllowToUpdateStatsFromBrowser=0
Hows that sounds guys
I'll do the cron job next
TT ( karl )