How does a day in a life of an Apache log message in modern systemd based Linux system look like? I would expect it to be something like that:

  1. Apache daemon writes a log message using syslog(3)
  2. this log message is written to /run/systemd/journal/dev-log
  3. systemd-journald reads the log message from /run/systemd/journal/dev-log
  4. systemd-journald writes it to /run/systemd/journal/syslog
  5. rsyslogd or syslog-ng listen on /run/systemd/journal/syslog, get the message and then process it based on their configuration

Am I missing something? Is it possible that Apache logs(for example access log messages) directly to files, bypassing the whole logging system altogether?


It depends on the Apache configuration. As documented in mod_log_config, CustomLog can be used to send logs directly a file or pipe them to a command. That command could in turn pipe the contents on to a syslog daemon or even into the systemd journal.

The not-yet-released Apache 2.5 allows logging directly to systemd via mod_journald.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.