Web ✓ fields verified against sample logs

Apache Error Log Format: Fields, AH Codes and Examples

Published

One entry per problem Apache or a module reported: the time, the module and severity, the process and thread, the client address when a request caused it, then the message — usually tagged with an AH code that identifies it in Apache's source.

Official documentation: Apache httpd: ErrorLogFormat directive · Apache httpd: LogLevel directive · Apache httpd: Log Files (error log)

Sample record

[Mon Oct 26 06:25:01.334891 2026] [mpm_event:notice] [pid 812:tid 140245006116736] AH00489: Apache/2.4.58 (Ubuntu) configured -- resuming normal operations
[Mon Oct 26 06:25:01.334957 2026] [core:notice] [pid 812:tid 140245006116736] AH00094: Command line: '/usr/sbin/apache2'
[Mon Oct 26 09:12:44.571203 2026] [php:warn] [pid 1102:tid 140244913862208] [client 192.0.2.14:52210] PHP Warning:  Undefined array key "page" in /var/www/html/index.php on line 27, referer: https://shop.example.com/

From the LogTriage parser test corpus — synthetic data, no real hosts or users.

Explain this record field by field →

Field reference

Field Type Meaning Why it matters for security
%te.g. Tue Oct 27 03:41:10.204511 2026 date-time Apache: "The current time"; %{u}t, used in the default 2.4 format, adds microseconds. Server local time, without a zone. Join with the access log by time and client address; the error line usually lands within a millisecond of the request.
%me.g. authz_core string Apache: "Name of the module logging the message" — core, authz_core, auth_basic, php, ssl and so on. The module tells you what kind of event it is before you read the text — authz_core and auth_basic lines are access decisions.
%le.g. error string Apache: "Loglevel of the message" — emerg, alert, crit, error, warn, notice, info, debug or trace1–8. Only messages at or above the configured LogLevel are written, so what is missing depends on that setting.
%Pe.g. 1931 number Apache: "Process ID of current process." Several errors from one child process in a row can be one request's chain of failures.
%Te.g. 140244913862208 number Apache: "Thread ID of current thread", with threaded MPMs such as event and worker. With the pid, it ties together the lines one request produced, including a PHP stack trace.
%ae.g. 198.51.100.23:50412 address:port Apache: "Client IP address and port of the request." Present only when a request caused the message. The address to count and pivot on; behind a proxy it is the proxy unless mod_remoteip is configured.
%Me.g. AH01617: user admin: authentication failure for "/admin/": Password Mismatch string Apache: "The actual log message" — normally an AH code followed by the text; PHP and other modules write their own text. Read it for the verdict — denied by configuration, password mismatch, invalid URI, a PHP fatal error.
AH01630e.g. AH01630: client denied by server configuration: /var/www/html/.env message code mod_authz_core refused a request because of the configuration (a Require directive) — the path is the file asked for. Requests for .env, .git or server-status that were denied are probes; denied is good, but the address is scanning.
AH01617e.g. AH01617: user admin: authentication failure for "/admin/": Password Mismatch message code mod_auth_basic rejected the password for a user that exists; AH01618 is logged when the user is not found. Many from one client address is password guessing against Basic auth; many users from one address is spraying.
AH00126e.g. Invalid URI in request '/../../../../etc/passwd' 'GET /../../../../etc/passwd HTTP/1.1' message code Apache core rejected a request whose URI could not be resolved, such as one climbing above the document root. Directory traversal attempts; Apache refused this one, but check the access log for encoded variants that got through.

Have one of your own records? Paste it into the log line explainer and each field is explained from this table, with times, codes and addresses decoded — in your browser.

What it records

The error log is where Apache httpd and its modules report problems: requests they refused, authentication failures, scripts that crashed, configuration and startup messages. Apache 2.4’s default line is defined by ErrorLogFormat as [%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i: the time with microseconds, the module and log level, the process and thread, the client address when a request was involved, the message, and the referrer when there was one. Apache 2.2 writes a shorter form, [time] [level] [client …] message.

The malicious sample is what a scan and a password attack look like from this side: AH01630 denials for .env and .git, PHP’s script … not found or unable to stat for WordPress paths that do not exist, an AH00126 traversal attempt, a PHP fatal error whose referrer carries a SQL injection payload, and a run of AH01617 password mismatches and AH01618 unknown users against /admin/ from one address.

Where to get it

  • The file. /var/log/apache2/error.log (Debian, Ubuntu) or /var/log/httpd/error_log (Red Hat family), or whatever the ErrorLog directive names — check virtual host blocks too.
  • LogLevel. LogLevel decides what is written; the default is warn. Per-module levels (LogLevel warn authz_core:info) add detail where it is needed without flooding the file.
  • Containers. The official httpd image writes the error log to standard error.
# Client addresses with the most Basic-auth password failures
grep -E "AH01617|AH01618" /var/log/apache2/error.log | grep -oE "\[client [0-9a-f.:]+" | cut -d' ' -f2 | sed 's/:[0-9]*$//' | sort | uniq -c | sort -rn

Parsing pitfalls

  • Two layouts. Apache 2.4 writes [module:level] and [pid P:tid T]; 2.2 writes [level] alone. A custom ErrorLogFormat can change everything.
  • Multi-line entries. PHP stack traces continue on following lines (Stack trace:, #0 …, thrown in …) without the bracketed header; join them to the entry above.
  • Client with port. [client 198.51.100.23:50412] includes the source port; strip it before counting addresses, and remember IPv6 addresses contain colons too.
  • No zone. Times are local and carry no offset.
  • Level hides events. At the default warn level missing files are not logged; do not read an empty error log as “nothing happened”.

Detection ideas

  • Basic auth guessing: many AH01617/AH01618 from one client address — the Apache admin login brute force rule.
  • Probing: AH01630 denials and PHP script … not found for .env, .git, wp-login.php, phpinfo.php; the web probe reference explains each.
  • Traversal: AH00126 Invalid URI with ../ sequences.
  • Injection hitting the application: PHP fatal errors or database errors whose referer or path carries quotes, UNION or OR 1=1.

The free browser analyzer reads Apache 2.2 and 2.4 error logs, joins stack traces and runs these checks locally.

Detections and guides for Apache HTTP Server error log

Frequently Asked Questions

Where is the Apache error log?
Debian and Ubuntu write /var/log/apache2/error.log; Red Hat and its relatives write /var/log/httpd/error_log. The ErrorLog directive sets the file, and virtual hosts often have their own. On containers the official image sends it to standard error, so docker logs shows it.
What are the AH numbers in Apache error messages?
Every message Apache httpd and its bundled modules log carries a tag such as AH01630, which identifies that one message in the source code. The text after it can be read by people, but the code is the stable thing to search for: AH01630 is a request denied by configuration, AH01617 a Basic auth password mismatch.
Why are 404s missing from the error log?
In Apache 2.4 a request for a missing static file is logged at the info level, below the default LogLevel of warn, so most scanning of nonexistent paths only shows in the access log. Requests the configuration denies (AH01630) and missing PHP scripts (logged by PHP at error level) do appear.
How do I match error log lines to access log lines?
Use the client address from [client …] and the time: the access log writes the request when it completes, usually within a second of the error. For exact matching, add %L (the log ID) to ErrorLogFormat and %L to the access log format, and Apache will write the same ID in both.

Analyze a Apache HTTP Server error log file in your browser

The free analyzer detects this format, parses every field above and flags attack patterns — the file never leaves your machine. For threat-intel enrichment and an AI-written incident report, run it through LogTriage.

Investigating something right now? LogTriage checks every address in the file against threat intelligence and writes the incident report: 10 analyses a month free. The incident pack adds the in-depth AI analysis and files up to 100 MB: 25 analyses for $19, one payment, no subscription. Pricing

How this page was made. The official definitions, field names and examples on it are copied by script from the sources it links and re-checked against them on every build. The investigation advice was drafted with AI from those sources and passed a separate review before publishing. What is checked, and how · found a mistake? [email protected]