The HTTPD log file format
When working with any file, the first task is to become familiar with the file schema. In simple terms, we need to know what is represented by each field and what is used to delimit the fields. We will be working with the access log file from an Apache HTTPD web server. The location of the log file can be controlled from the httpd.conf file. The default log file location on a Debian-based system is /var/log/apache2/access.log; other systems may use the httpd directory in place of apache2.
The log file is already in the code bundle, so you can download it and use it directly.
Using the tail command, we can display the end of the log file. Although, to be fair, the use of cat will do just as well with this file, as ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access