Apache Log Files
Apache includes two log files by default. The access_log file is used to track client requests. The error_log is used to record important events, such as errors or server restarts. These files don't exist until you start Apache for the first time. The files are named access.log and error.log in Windows platforms.
When a client requests a file from the server, Apache records several parameters associated with the request, including the IP address of the client, the document requested, the HTTP status code, and the current time. Listing 3.5 shows sample log file entries. Chapter 25, "Logging and Monitoring Web Server Activity," will show you how to modify which parameters are logged.
Listing 3.5. Sample access_log EnTRies
1: 127.0.0.1 - - [04/Sep/2004:09:43:37 -0700] "GET / HTTP/1.1" 200 1494 2: 127.0.0.1 - - [04/Sep/2004:09:43:40 -0700] "GET /manual/ HTTP/1.1" 200 10383
This file includes error messages, startup messages, and any other significant events in the life cycle of the server. This is the first place to look when you have a problem with Apache. Listing 3.6 shows sample error_log enTRies.
Listing 3.6. Sample error_log EnTRies
1: [Sun Sep 04 09:42:59 2004] [notice] Parent: Created child process -2245 2: [Sun Sep 04 09:42:59 2004] [notice] Child -2242: Child process is running 3: [Sun Sep 04 09:42:59 2004] [notice] Child -2242: Acquired the start mutex. 4: [Sun Sep 04 09:42:59 2004] [notice] Child -2242: Starting 250 worker threads.
In general, you do not need to worry about these files.