How can I keep statistics about my web server?

There are several tools which can generate statistics about your web server.
Combined Log Handling System
The Combined Log Handling System is a log analyzer written in Perl which is able to read the logs of many different server packages, including ftp, gopher, several web server flavors, archie, and others. The system converts log entries to a single format and providing summary data (URL is <URL:http://www.hensa.ac.uk/tools/www/logtools/> ).
getstats
getstats is a versatile log analyzer, written in C, which provides reports for various time periods with a high degree of flexibility. Add-on packages have been written to generate reports in HTML and also to generate graphs. You can access the getstats home page for more information (URL is http://www.eit.com/software/getstats/getstats.html ), or obtain the package by anonymous FTP from ftp.eit.com in the directory /pub/web.software/getstats.
WebStat
WebStat is a package written in the language Python which supplies statistics on usage by domain, country, etc., with daily, weekly, monthly and annual reports available. You will need Python in order to use it. See the WebStat home page (URL is http://www.pegasus.esprit.ec.org/people/sijben/statistics/advertisment.html ) for details, or obtain Python from ftp.cwi.nl in the directory /pub/python and WebStat from ftp.pegasus.esprit.ec.org in the directory /pub/misc.
Wusage
Wusage, which I wrote, is a C program which generates simple weekly reports in HTML, with inline image graphs displaying server growth and the distribution of accesses by continent. You can also exclude irrelevant accesses (inline images, local machines, etc.) from the results. Read the Wusage home page (URL is http://siva.cshl.org/wusage.html ) for more information, or obtain Wusage by anonymous FTP from isis.cshl.org in the directory pub/wusage.
wwwstat
wwwstat is a full-featured log analyzer written in the language Perl. (See the newsgroup comp.lang.perl.misc for more information about the language.) See the wwwstat home page (URL is http://www.ics.uci.edu/WebSoft/wwwstat/) for more information, or obtain the package by anonymous FTP from liege.ics.uci.edu in the directory /pub/arcadia/wwwstat. See also gwstat (URL is http://dis.cs.umass.edu/stats/gwstat.html ), a package which produces GIF graphs from the output of wwwstat.
bert
Bert is an acronym for Browser-log Extraction and Reporting Tool. It takes the agent_log and gives information about which browsers people have been using to access your site with. You can access the bert home page for more information (URL is <URL:http://onyx.slu.edu/dylan/bert.html> ).
Quickstats
Quickstats is a straightforward log analysis package, oriented toward simple queries such as the popularity of a particular page. Quickstats can also ignore specific sites, among other options. Check out the QuickStats home page: <URL:http://spwww.mcit.med.umich.edu/~jauderho/scripts/quickstats.html>
ErrorChk
Unlike most log statistics programs, ErrorChk analyzes and reports on the contents of the error log created by the NCSA server. This is useful as a means of diagnosing server problems. (URL is <URL: http://coney.gsfc.nasa.gov/Syeds/software/errorchk.html> )
Snowhare's Log Analysis Tools
Snowhare (Benjamin Franz) has made a suite of log analysis tools written in Perl available at <URL:http://www.netimages.com/~snowhare/utilities/> which include graphical reports.
analog
Analog is a server log analysis package which emphasizes simplicity of installation, speed and attractive results. See <URL:http://www.statslab.cam.ac.uk/~sret1/analog/> for more information.

World Wide Web FAQ