Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I review (a fast reading) Apache Module mod_log_config and can't figure out what is the apache2 default log format and where is defined it. Any idea?

Note that what is on


is not a default option but a global option.

share|improve this question
up vote 3 down vote accepted

It is clearly stated in the documetation for the TransferLog statement:

This directive has exactly the same arguments and effect as the CustomLog directive, with the exception that it does not allow the log format to be specified explicitly or for conditional logging of requests. Instead, the log format is determined by the most recently specified LogFormat directive which does not define a nickname. Common Log Format is used if no other format has been specified.

Go on to the LogFormat statement:

Default: LogFormat "%h %l %u %t \"%r\" %>s %b"

So if a TransferLog statement is given without any LogFormat statement the output format is as described above.

If also the TransferLog statment is missing no access log is written.

share|improve this answer
Thanks, but still can't read anything about TransferLog default, I mean, are you saying that if no CustomLog is specified, the TransferLog directive is in charge even it is not specified? If that is the case, where do you read that? cos TransferLog hasn't a default section defined. Thanks again. – gsi-frank Mar 4 '13 at 23:13
If no TransferLog is defined, it is not written. – H.-Dirk Schmitt Mar 4 '13 at 23:21

Default LogFormat is indeed really

Default: LogFormat "%h %l %u %t \"%r\" %>s %b"

But the log format apache uses by default (on Debian distro at least) is:

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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