Apache HTTP Server Log
The Apache HTTP Server provides a detailed and flexible
Using the Error Log to Diagnose the Apache HTTP Server
The Apache HTTP Server records diagnostic information and all errors encountered while processing requests to the error log file, error_log.
For example, if you visit a nonexistent URL, the following 404 error is generated:
The requested
All error information is recorded in the default error log file, which you can obtain by entering the following command:
#tail
The following message is added to the end of the file:
[Sat Feb 03 13:03:55 2007] [error] [client 10.100.0.86] File does not
Using Webalizer to Perform Apache HTTP Server Log Analysis
Webalizer is an analysis tool that you can use to generate detailed usage reports using the information recorded in the Apache HTTP Server logs. Webalizer provides
Use the following procedure to set up Webalizer:
1.Modify the Webalizer configuration file, /etc/webalizer.conf, by adding the following lines:
LogFile /var/log/apache2/access_log
OutputDir /srv/www/htdocs/webalizer
2.Restart the Apache server by entering the following:
#/etc/init.d/apache2 restart
3.Run the Webalizer program to generate a report:
#webalizer
A message similar to the following appears:
Webalizer
DNS Lookup (10): 1 addresses in 1.00 seconds, 1/sec Using DNS cache file dns_cache.db
Creating output in /srv/www/htdocs/webalizer Hostname for reports is
Saving history information...
307 records in 1.00 seconds, 307/sec
Verify that the server status configuration is correct by opening a browser and entering the following website:
http://<YOUR_WEB_SERVER_IP>/webalizer
Figure 8 shows an example of a Webalizer usage report web page.
Installing, Configuring, and Managing Web Server Middleware Stack Components 21