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.

access_log

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 2.5 shows sample log file entries. Chapter 24, “Logging and Monitoring Server Activity,” will show you how to modify which parameters are logged.

Listing 2.5. Sample access_log Entries ...

Get Sams Teach Yourself PHP, MySQL® and Apache All in One now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.