Apache HTTP Server Error Log
Logs errors, warnings, and diagnostic information
Quick Facts
Default Path (Linux)
/var/log/apache2/error.logDocker
stderrDefault Format
text
JSON Native
No
Rotation
logrotate
Log Example
Default format: Default Error Format
Example Log Entrylog
[Thu Dec 20 14:32:18.123456 2025] [core:error] [pid 1234:tid 5678] [client 192.168.1.50:54321] File does not exist: /var/www/html/missing.htmlStructure:
[timestamp] [module:level] [pid tid] [client ip:port] messagePaths by Platform
Debian , Ubuntu
/var/log/apache2/error.logRHEL / CentOS / Fedora
/var/log/httpd/error_logAvailable Formats
Default Error Format
Default
Example:
[Thu Dec 20 14:32:18.123456 2025] [core:error] [pid 1234:tid 5678] [client 192.168.1.50:54321] File does not exist: /var/www/html/missing.htmlStructure:
[timestamp] [module:level] [pid tid] [client ip:port] messageFields Reference
| Field | Type | Description | Example |
|---|---|---|---|
timestamp | datetime | When the error occurred | Thu Dec 20 14:32:18.123456 2025 |
module | string | Apache module that generated the message | core |
level | string | Log level | error |
pid | integer | Process ID | 1234 |
tid | integer | Thread ID | 5678 |
client | string | Client IP and port | 192.168.1.50:54321 |
message | string | Error message | File does not exist: /var/www/html/missing.html |
Parsing Patterns
Regular Expressions
default:
^\[(?P<timestamp>[^\]]+)\] \[(?P<module>[^:]+):(?P<level>[^\]]+)\] \[pid (?P<pid>\d+):tid (?P<tid>\d+)\] (?:\[client (?P<client>[^\]]+)\] )?(?P<message>.*)$Collector Configurations
logstashruby
1filter {2 grok {3 match => { "message" => "\[%{DATA:timestamp}\] \[%{WORD:module}:%{WORD:level}\] \[pid %{NUMBER:pid}:tid %{NUMBER:tid}\] (?:\[client %{DATA:client}\] )?%{GREEDYDATA:error_message}" }4 }5}Configuration
Enable Logging
Directive:
ErrorLog /var/log/apache2/error.logUse Cases
Error rate monitoring
Track error frequency
level
timestamp
Troubleshooting
Tested On
v2.4.58 on Ubuntu 24.04
admin - 2025-12-10
Last updated: 2025-12-15 by admin
1 contributor45 upvotes
Validated
Community Discussions
Help improve this documentation
Found an error or want to add more examples? Contributions are welcome!