Apache HTTP Server logo

Apache HTTP Server Error Log

Logs errors, warnings, and diagnostic information

Quick Facts

Default Path (Linux)
/var/log/apache2/error.log
Docker
stderr
Default 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.html

Structure:

[timestamp] [module:level] [pid tid] [client ip:port] message

Paths by Platform

Debian , Ubuntu
/var/log/apache2/error.log
RHEL / CentOS / Fedora
/var/log/httpd/error_log

Available 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.html

Structure:

[timestamp] [module:level] [pid tid] [client ip:port] message

Fields Reference

FieldTypeDescriptionExample
timestamp
datetime
When the error occurredThu Dec 20 14:32:18.123456 2025
module
string
Apache module that generated the messagecore
level
string
Log levelerror
pid
integer
Process ID1234
tid
integer
Thread ID5678
client
string
Client IP and port192.168.1.50:54321
message
string
Error messageFile 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.log

Use 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!