55
edits
(Incorrect logfile format) |
(Fixed servername, paths and serveral script typos.) |
||
Line 1: | Line 1: | ||
So you want to see the statistics for your webpage? | So you want to see the statistics for your webpage? | ||
To see the logs for all the webpages on redbrick, 'ssh | To see the logs for all the webpages on redbrick, 'ssh murphy' and then look in '/var/log/apache2'. The logs are split up by year, date and type. So the access logs for the 8th of March 2008 would be found at '/var/log/apache2/2008/03/08-combined_log'. You can pipe any of the logs to 'grep /~username' to pick out information on your own page. | ||
If your using a vhost (i.e. your own web domain) on redbrick you won't be able to pick out hits to your domain using the grep method above. You should ask the admins to generate logs for your domain. Sometime in the future, the combined logs may be configured to handle these web domains. | If your using a vhost (i.e. your own web domain) on redbrick you won't be able to pick out hits to your domain using the grep method above. You should ask the admins to generate logs for your domain. Sometime in the future, the combined logs may be configured to handle these web domains. | ||
Line 29: | Line 29: | ||
Set the 'SiteDomain' option to 'SiteDomain="www.redbrick.dcu.ie"' | Set the 'SiteDomain' option to 'SiteDomain="www.redbrick.dcu.ie"' | ||
Set the 'LogFile' option to 'LogFile="/ | Set the 'LogFile' option to 'LogFile="/var/log/apache2/%YYYY-0/%MM-0/%DD-0-combined_log"'. | ||
If you want to gather stats for more than a day, say the whole month, then replace the 'LogFile' option with this: 'LogFile="/pathtotools/logresolvemerge.pl / | If you want to gather stats for more than a day, say the whole month, then replace the 'LogFile' option with this: 'LogFile="/pathtotools/logresolvemerge.pl /var/log/apache2/%YYYY-0/%MM-0/*-combined_log |"'. Replace 'pathtotools' to point to where you installed the awstat tools directory. Be warned, this will slow down the update process by a few minutes. BTW, before 'logresolvemerge.pl' will run, you'll have to change the permissions to excutable, i.e. 'chmod 755 /pathtotools/logresolvemerge.pl'. | ||
If you want only your logs you can use 'grep' to do it. Change 'LogFile' to 'LogFile="grep /~username / | If you want only your logs you can use 'grep' to do it. Change 'LogFile' to 'LogFile="grep /~username /var/log/apache2/%MM-0/%DD-0-combined_log |"' and change 'username' to your username to get only your hits. (Rememeber this does not work for vhosts though you can write a script that combines vhost logs with these logs etc.) | ||
If you've kept the same directory structure from the awstats archive and uploaded it to your web space in some subdirectory, you may notice none of the icons appear. Change the option 'DirIcons' to 'DirIcons="../icon"'. | If you've kept the same directory structure from the awstats archive and uploaded it to your web space in some subdirectory, you may notice none of the icons appear. Change the option 'DirIcons' to 'DirIcons="../icon"'. |