Bug 11053

Summary: LogFormat must be <IFModule>'ed in httpd.conf
Product: Sisyphus Reporter: Konstantin A Lepikhov (L.A. Kostis) <lakostis>
Component: apacheAssignee: Michael Shigorin <mike>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: enhancement    
Priority: P2 CC: at, cas, crux, ender, lakostis, ldv, mike, mithraen, qa_viy, rider, shaba, solo, viy
Version: unstableKeywords: relnote
Hardware: all   
OS: Linux   

Description Konstantin A Lepikhov (L.A. Kostis) 2007-03-12 01:09:39 MSK
suggested /etc/httpd/conf/httpd.conf config example:

#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
<IfModule mod_log_config.c>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%a %l %u %t \"%r\" %>s %b" common-quick
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
<IfModule mod_deflate.c>
    LogFormat "%a %l %u %t \"%r\" %>s %b \"%{defl_m}n:%{defl_r}n\"" common-deflate
</IfModule>
</IFModule>

It's ease configuration behavior when mod_log_config.c is disabled (i.e backed
configuration with external log service).
Comment 1 Michael Shigorin 2007-03-12 22:36:56 MSK
implemented in 1.3.37rusPL30.23-alt1
Comment 2 Michael Shigorin 2008-04-19 22:41:58 MSD
more complete fix in apache-1.3.41rusPL30.23-alt4:

<IfModule mod_log_config.c>
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    LogFormat "%a %l %u %t \"%r\" %>s %b" common-quick
    LogFormat "%{Referer}i -> %U" referer
    LogFormat "%{User-agent}i" agent
    <IfModule mod_deflate.c>
        LogFormat "%a %l %u %t \"%r\" %>s %b \"%{defl_m}n:%{defl_r}n\""
common-deflate
    </IfModule>
    #
    # The location and format of the access logfile (Common Logfile Format).
    # If you do not define any access logfiles within a <VirtualHost>
    # container, they will be logged here.  Contrariwise, if you *do*
    # define per-<VirtualHost> access logfiles, transactions will be
    # logged therein and *not* in this file.
    #
    CustomLog /var/log/httpd/access_log common-quick
</IfModule>