You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long. 4.3 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. So you want to see the statistics for your webpage?
  2. **This no longer works because of permissions**
  3. To see the logs for all the webpages on redbrick, 'ssh <strike>murphy</strike> pyg' 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.
  4. If your using a vhost (i.e. your own web domain) on redbrick you won\'t
  5. be able to pick out hits to your domain using the grep method above. You
  6. should ask the admins to generate logs for your domain. Sometime in the
  7. future, the combined logs may be configured to handle these web domains.
  8. If you want a more graphical representation, you can use a tool like
  9. [awstats](/#Using_AWStats "wikilink"). [ryaner](/User:Ryaner "wikilink")
  10. generates [awstats for all of
  11. Redbrick](
  12. ## Using AWStats
  13. Install [AWstats]( into your webpage as
  14. instructed but you will use different options for when you run
  15. \'\'. You must run \'\' on
  16. \'deathray\'.
  17. For \'Do you want to continue setup from this NON standard directory
  18. \[yN\] ?\' answer \'y\'.
  19. For \'Config file path (\'none\' to skip web server setup):\' answer
  20. \'none\'.
  21. For \'Do you want me to build a new AWStats config/profile file
  22. (required if first install) \[y/N\] ?\' answer \'y\'.
  23. For \'Your web site, virtual server or profile name:\' answer
  24. \'\'.
  25. For \'Directory path to store config file(s) (Enter for default):\'
  26. answer the directory containing the \'\'. This might be
  27. something like \'/webtree/c/cammy/awstats/wwwroot/cgi-bin\'. This
  28. directory will be where the profile is created.
  29. Let the script finish.
  30. Now there should be a \'\' created in
  31. the same directory as \'\' (depending on your options).
  32. You\'ll need to configure a few things within it to get it to work. Open
  33. it in your favourite text editor.
  34. Set the \'DirData\' option to \'DirData\'\".\"\'. This will generate the
  35. data files in the same place as the \'\' script. The default
  36. location is invalid.
  37. Set the \'SiteDomain\' option to \'SiteDomain=\"\"\'
  38. Set the \'LogFile\' option to
  39. \'LogFile=\"/var/log/apache2/%YYYY-0/%MM-0/%DD-0-combined_log\"\'.
  40. If you want to gather stats for more than a day, say the whole month,
  41. then replace the \'LogFile\' option with this:
  42. \'LogFile=\"/pathtotools/
  43. /var/log/apache2/%YYYY-0/%MM-0/\*-combined_log \|\"\'. Replace
  44. \'pathtotools\' to point to where you installed the awstat tools
  45. directory. Be warned, this will slow down the update process by a few
  46. minutes. BTW, before \'\' will run, you\'ll have to
  47. change the permissions to excutable, i.e. \'chmod 755
  48. /pathtotools/\'.
  49. If you want only your logs you can use \'grep\' to do it. Change
  50. \'LogFile\' to \'LogFile=\"grep /\~username
  51. /var/log/apache2/%MM-0/%DD-0-combined_log \|\"\' and change
  52. \'username\' to your username to get only your hits. (Rememeber this
  53. does not work for vhosts though you can write a script that combines
  54. vhost logs with these logs etc.)
  55. If you\'ve kept the same directory structure from the awstats archive
  56. and uploaded it to your web space in some subdirectory, you may notice
  57. none of the icons appear. Change the option \'DirIcons\' to
  58. \'DirIcons=\"../icon\"\'.
  59. There are also a number of plugins avaliable on Redbrick that can be
  60. used by awstats. Update the \'LoadPlugin\' options with these settings:
  61. `LoadPlugin="ipv6"`\
  62. `LoadPlugin="hashfiles"`\
  63. `LoadPlugin="geoip GEOIP_STANDARD"`
  64. Of course, you can also set or change any other options you want.
  65. Make sure the permissions are correct on the script. \'chmod
  66. 755 /pathtoawstats/\'.
  67. Now, as per the original instructions for
  68. [AWStats](, you can do a initial update
  69. of the logs (i.e. \' -update\').
  70. This must be done on \'deathray\' just like the configure script. This
  71. will compile the stats from the logs selected by the \'LogFile\' option.
  72. You can then generate static html pages or load it all up dynamically as
  73. per the awstat setup documentation.
  74. [Category:HowTo](/Category:HowTo "wikilink")