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.
The access_log File
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 26, "Logging and Monitoring Server Activity," will show you how to modify which parameters are logged.
Example 3.5. Sample access_log Entries
1: 127.0.0.1 - - [26/Jan/2006:09:43:37 -0700] "GET / HTTP/1.1" 200 1494 2: 127.0.0.1 - - [26/Jan/2006:09:43:40 -0700] "GET /manual/ HTTP/1.1" 200 10383
The error_log File
The error_log 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.
Example 3.6. Sample error_log Entries
1: [Tue Jan 26 09:42:59 2006] [notice] Parent: Created child process -2245 2: [Tue Jan 26 09:42:59 2006] [notice] Child -2242: Child process is running 3: [Tue Jan 26 09:42:59 2006] [notice] Child -2242: Acquired the start mutex. 4: [Tue Jan 26 09:42:59 2006] [notice] Child -2242: Starting 250 worker threads.
The httpd.pid file contains the process ID of the running Apache server. You can use this number to send signals to Apache manually, as described in the next section.
The scoreboard file, present configuration files on Linux/UNIX Apache, is used by the process-based MPMs to communicate with their children.
In general, you do not need to worry about these files.