Name
TransferLog
Synopsis
TransferLog [file| "|command"] Default: none Server config, virtual host
TransferLog
specifies the file in which to store the log of accesses to the site.
If it is not explicitly included in the Config file, no log will be
generated.
-
file This is a filename relative to the server root (if it doesn’t start with a slash), or an absolute path (if it does).
-
command Note the format:
"|command". The double quotes are needed in the Config file.commandis a program to receive the agent log information on its standard input. Note that a new program is not started for a virtual host if it inherits theTransferLogfrom the main server. If a program is used, it runs using the permissions of the user who started httpd. This is root if the server was started by root, so be sure the program is secure. A useful Unix program to which to send is rotatelogs,[1] which can be found in the Apache support subdirectory. It closes the log periodically and starts a new one, and it’s useful for long-term archiving and log processing. Traditionally, this is done by shutting Apache down, moving the logs elsewhere, and then restarting Apache, which is obviously no fun for the clients connected at the time!
[1] Written by one of the authors of this book (BL).
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access