access log
A log file where a web server writes one line per request, with the client address, time, method, path and status code.
In more detail
Its fixed layout makes it easy to search and count with text tools, for example how many requests returned 404 or which paths are busiest. Web servers such as Apache and nginx write one by default.
Examples
grep GET access.log | grep -c ' 200 '192.0.2.66 - - [21/Sep/2026:09:52:30 +0000] "POST /login HTTP/1.1" 401 412for line in open("access.log"):Related terms
- HTTP status code — The three-digit number at the start of a response, such as 200 or 404, that says how the server handled the request.
- grep — The command that prints the lines of its input that match a pattern.
- cut command — The cut command, which extracts columns from each line, either by character position or by fields split on a delimiter.
- HTTP method — The verb at the start of a web request that says what the client wants, such as GET to read or POST to create.
- regular expression — A pattern language for matching text, where characters such as ., *, ^ and $ have special meanings.
- reconnaissance — The first stage of an attack, in which the attacker gathers information about the target, such as staff names, systems and suppliers.
- auth.log — The Linux log file that records logins, SSH sessions, sudo use and other authentication events.
- audit trail — A record of who did what and when, kept so actions can be reviewed and investigated later.
- redaction — Removing or hiding sensitive values, such as tokens or personal data, before data is logged, displayed or shared.
- query string — The part of a web address after the question mark, made of name=value pairs, such as ?state=open&limit=2.
Taught in
- Moving Around: pwd, ls, cd And Paths — Bash Scripting & Command Line Automation
- Pipelines, tee And Process Substitution — Bash Scripting & Command Line Automation
- Finding Lines: grep And Regular Expressions — Bash Scripting & Command Line Automation
- Reshaping Text: cut, sort, uniq, tr, sed, awk — Bash Scripting & Command Line Automation
- Threat Actors, Motivations & Cyber Kill Chain — Cybersecurity Fundamentals, GRC & Cryptography
- Least Privilege In IAM And RBAC — Application Security & Threat Modeling for Engineers
- Why Secrets Leak — Application Security & Threat Modeling for Engineers