homepageТарифыКлиентамДилерамО насЗаказать

Apache 1.3 documentation
Access Control by URL
Apache 1.3 Dynamic Shared Object (DSO) support
Apache Content Negotiation
Apache Keep-Alive Support
Apache Multiple Log Files
Apache extra features
Apache module mod_foobar
Apache suEXEC Support
Apache suEXEC Support
Apache's Handler Use
Compiling Apache under UnixWare
Compiling and Installing Apache
Custom error responses
How Directory, Location and Files sections work
Installing Apache on TPF
Issues Regarding DNS and Apache
New features with Apache 1.1
New features with Apache 1.2
New features with Apache 1.3
PATH_INFO Changes in the CGI Environment
Server Pool Management
Setting which addresses and ports Apache uses
Source Re-organisation
Special Purpose Environment Variables
Starting Apache
Stopping and Restarting Apache
The Apache EBCDIC Port
The Apache TPF Port
Upgrading to 1.3 from 1.2
Using Apache with Microsoft Windows
Using Apache with Novell NetWare 5

Apache Multiple Log Files

It is now possible to specify multiple log files, each with a fully customizable format. This is compatible with existing configurations. Multiple log files are implemented as part of the mod_log_config module which as of Apache 1.2 is the default log module.

Using Multiple Log Files

Multiple log files be created with either the TransferLog or CustomLog directive. These directives can be repeated to create more than one log file (in previous releases, only one logfile could be given per server configuration). The TransferLog directive creates a log file in the standard "common log format", although this can be customized with LogFormat. The syntax of these two directives is the same as for the config log module in previous Apache releases.

The real power of multiple log files come from the ability to create log files in different formats. For example, as well as a CLF transfer log, the server could log the user agent of each client, or the referrer information, or any other aspect of the request, such as the language preferences of the user.

The new CustomLog directive takes both a filename to log to, and a log file format.

Syntax: CustomLog filename "format"
Context: server config, virtual host
Status: base
Module: mod_log_config

The first argument is the filename to log to. This is used exactly like the argument to TransferLog, that is, it is either a file as a full path or relative to the current server root, or |programname. Be aware that anyone who can write to the directory where a log file is written can gain access to the uid that starts the server. See the security tips document for details.

The format argument specifies a format for each line of the log file. The options available for the format are exactly the same as for the argument of the LogFormat directive. If the format includes any spaces (which it will do in almost all cases) it should be enclosed in double quotes.

Use with Virtual Hosts

If a <VirtualHost> section does not contain any TransferLog or CustomLog directives, the logs defined for the main server will be used. If it does contain one or more of these directives, requests serviced by this virtual host will only be logged in the log files defined within its definition, not in any of the main server's log files. See the examples below.

Специальные ссылки См. также
  • Создание и редизайн сайта

  • Вакансии

  • Разное - полезное

  • Архив новостей

  • Задать вопрос

  • Вопросы и ответы

  • Версия для печати
    HomepageРазведкаПлан-карта местности

    Copyright © 2000-2017 HOST-ING.RU
    Контактная информация

    Сайт создан студией