Bug 11053 - LogFormat must be <IFModule>'ed in httpd.conf
Summary: LogFormat must be <IFModule>'ed in httpd.conf
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: apache (show other bugs)
Version: unstable
Hardware: all Linux
: P2 enhancement
Assignee: Michael Shigorin
QA Contact: qa-sisyphus
URL:
Keywords: relnote
Depends on:
Blocks:
 
Reported: 2007-03-12 01:09 MSK by Konstantin A Lepikhov (L.A. Kostis)
Modified: 2008-04-19 22:41 MSD (History)
13 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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>