How can I keep statistics about my web server?

There are several tools which can generate statistics about your web server:
getstats
getstats is a versatile log analyzer, also 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 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.

World Wide Web FAQ