Skip to content
BENIBIX Learn

Access Log

Infrastructure🌍 Web Serving & NginxServer Configuration

Also known as access.log, Web Server Log, Request Log

A file with a line for each visit to a web server.

Think of it like

It is like a visitors' book at a front desk. Everyone who comes in writes their name and the time.

Example

Jack's site shows errors. He reads the access log and finds hundreds of 404 answers for one old link.

Why it matters

It is the first place to look when a page breaks or the traffic looks odd.

Definition

An access log is a file where a web server writes one line for each request. The line shows who asked, when, what they asked for and what answer they got. It also shows the size of the answer and the browser used. Nginx and Apache both write one by default. A separate error log keeps the problems.

Example code

console
$ tail -n 1 /var/log/nginx/access.log
203.0.113.5 - - [16/Nov/2026:10:42:07 +0000] "GET /about HTTP/1.1" 200 5120 "-" "Mozilla/5.0"
One request, one line. Who asked, when, what for, the status code and the size.
Each request through the web server adds one line to the access log, shown at the bottom.

Common mistake

Never rotating the log. It grows every day until the disk is full.

Key takeaways

  1. 1
    One line each. Every request is written down.
  2. 2
    Who, what, when. Address, path, time and status.
  3. 3
    Errors elsewhere. Problems go to the error log.