cvs: phpweb / mirroring-stats.php

From: Date: Sat, 18 Jan 2003 15:07:21 +0000
Subject: cvs: phpweb / mirroring-stats.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-15123@lists.php.net to get a copy of this message
goba Sat Jan 18 10:07:21 2003 EDT Added files: /phpweb mirroring-stats.php Log: First version of new stats setup instructions... Index: phpweb/mirroring-stats.php +++ phpweb/mirroring-stats.php <?php include_once "prepend.inc"; commonHeader("Setting Up Local Stats"); ?> <h1>Setting Up Local Stats</h1> <p> If you are hosting an official or unofficial mirror, and you would like to have local stats support, follow these steps. </p> <ol> <li> <p> <a href="http://www.mrunix.net/webalizer/">Get The Webalizer</a><br /><br /> The Webalizer is a web server log analysis program. It is designed to scan web server log files in various formats and produce usage statistics in HTML format for viewing through a browser. Note that Webalizer requires you to have the GD library installed on your site. </p> </li> <li> <p> Install The Webalizer<br /><br /> There is a <tt>configure</tt> file in the distribution now, and other setup options are also available. Consult the <tt>INSTALL</tt> file included in the package. Copy the executable to somewhere accessible, eg. <tt>/usr/bin</tt>. </p> </li> <li> <p> Grab <a href="/mirrorkit.tgz">mirrorkit.tgz</a>, extract <tt>stats/php.conf-dist</tt>, rename to <tt>php.conf</tt> and edit the file.<br /><br /> This is the main conf file for The Webalizer. Specifically, you will want to change the lines which define where your log file sits, where the output should go, and the name of your host machine. Look for these settings: LogFile, OutputDir, HostName, HideSite, HideReferrer. The stats directory is not required to be in the webroot, it may be aliased to be there (see <a href="/mirroring.php">mirroring.php</a>). </p> </li> <li> <p> Give it a test<br /><br /> From the command line in the stats directory, type: <pre> webalizer -c php.conf </pre> You should get an index file, a usage file for the current month, some images, and a history file. </p> </li> <li> <p> Add it to your cron<br /><br /> If all went well, in the previous step, it is ready to be updated regularly. Something like this will be sufficient (update things daily at 3 am): <pre> 0 3 * * * (cd /your/stats/folder;/usr/bin/webalizer -c php.conf) >/dev/null 2>&1 </pre> Provide the path of the stats directory in the "cd". </p> </li> </ol> <p> If you have any questions, try to ask them on the PHP Mirrors' mailing list (<a href="mailto:mirrors@php.net">mirrors@php.net</a>). We cannot guarantee, that we can solve your problem, of course, but it is worth a try. </p> <p> Originally written by Colin Viebrock in 1998 --- Last updated: 2003-Jan-18 </p> <?php commonFooter(); ?>

« previous php.mirrors (#15123) next »