Forum Moderators: DixonJones

Message Too Old, No Replies

Moving from Win2k to apache -help with log file format needed

         

gingerbreadman

9:50 am on Jan 7, 2003 (gmt 0)

10+ Year Member



I'm trying to figure out why my logs are not recording referrer or user agent info.

This is currently what the httpd conf file says.

# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

#
# 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 logs/access_log common

#
# If you would like to have agent and referer logfiles, uncomment the
# following directives.
#
#CustomLog logs/referer_log referer
#CustomLog logs/agent_log agent

#
# If you prefer a single logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#
CustomLog logs/access_log combined

any ideas much appreciated.

gingerbreadman

9:52 am on Jan 7, 2003 (gmt 0)

10+ Year Member



Should this be commented out if I just want the combined log file format will all the referer and user agent info.

LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

sugarkane

10:39 am on Jan 7, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Using 'CustomLog logs/access_log combined' *should* do the trick. Are you using any virtual hosts ie. more than one domain on the server? If so, check that you're not overiding the CustomLogs directive in your VirtualHosts definitions.

gingerbreadman

10:53 am on Jan 7, 2003 (gmt 0)

10+ Year Member



I am using virtual hosts on the server.

Sorry I'm not sure I know what you mean about checking the CustomLogs directive in your VirtualHosts definitions. Our Sys Admin has left rather suddenly and left me to work it out.

Any help would be appreciated. Trial and error and trying to understand the apache documentation isn't helping much.

gingerbreadman

11:29 am on Jan 7, 2003 (gmt 0)

10+ Year Member



Sugarkane

You are a star! I was overriding the CustomLogs directive in your VirtualHosts definitions.

cheers fella

sugarkane

11:33 am on Jan 7, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Glad you got it sorted out :)