Server logs: how they work
How logs work: where web server, login, mail, application, cloud and network logs are kept, what a web server log line contains, why rotation deletes them and how CDNs and proxies change the recorded address.
| Log | Where it is | What it can prove |
|---|---|---|
| Web server | Apache or Nginx access.log file, hosting control panel | Which pages were requested, from which address and when |
| System logins | auth.log on Linux, Windows Security log | Who logged in with which account, and the failed attempts |
| Mail server logs and message tracing | Whether a message was sent, received or forwarded | |
| Applications | Logs of the business software, CMS, database | Who changed, exported or deleted a piece of data |
| Cloud | Audit logs of Microsoft 365, Google Workspace, AWS | Logins, shares, downloads and rules created in accounts |
| CDN and web application firewall | The service’s dashboard, exports or API | The visitor’s real address when the site sits behind a proxy |
| VPN and firewall | Network appliances and their consoles | Who connected from outside, from where and for how long |
| Connectivity provider | Operator records, only at the request of the authorities | Which subscriber was using an address at that moment |
One line, seven pieces of information
A typical web server log line contains the requester’s address, date and time with the time zone, the method and page, the status code, the bytes sent, the referring page and the identifier of the program used. Codes such as 401 (access denied) and 302 (redirect, often after a successful login) tell a sequence of attempts on their own.
Server logs: step-by-step procedure
How logs are acquired and analysed: list the sources, ask for preservation at once, copy the originals including rotated files, compute the hash, record time zone and clock, convert to UTC, correlate, check completeness, write the report.
The pages of this topic
Back to the overviewServer logs: tools
Tools for logs: grep, awk and zgrep, Python and pandas, jq for JSON logs, platforms such as Elastic, OpenSearch and Splunk, Plaso for timelines, cloud audit logs, sha256sum, with an example run on a test log.
Server logs: mistakes to avoid
The most common mistakes with logs: waiting, copying only part, opening the originals, trusting the time, forgetting the CDN, confusing address and person, relying on screenshots, ignoring gaps.
Server logs: value in court
The value of logs in court under Italian law: electronic document and mechanical reproduction, integrity shown by the hash, completeness, provenance, times, acquisition from providers through a certified copy, challenges by the other party, the Capital One case.
Server logs: a worked case
A worked case: a professional firm’s website is defaced overnight; the server log shows only the CDN, the CDN logs the real address, rotated files the reconnaissance of the previous days and the clock a two-minute drift.
Server logs: checklist
The checklist for logs: preservation, acquisition, analysis and reporting.
Server logs: frequently asked questions
Short answers to the most common questions about server logs as evidence.