Apache Logging
Apache Better Log Rotation mod_log_rotate
Submitted by chris on January 27, 2006 - 01:07Important: The Apache provided tool rotatelogs.exe is to buggy to use "for real", see: Apache Rotatelogs.exe for Windows Server
Apache Rotatelogs.exe for Windows Server
Submitted by chris on January 27, 2006 - 12:14To make this issue even more disastrous when restarting the Apache (httpd.exe), not all instances of rotatelog.exe are released.
Doing some research on the web it looks like this issue has been going on since years (Apache 1.3, 2.0 and now 2.2....).
Note: I've verified this issue with both Apache 2.0.55 and 2.2.0
Apache Logs (Awstats)
Submitted by chris on January 20, 2006 - 00:06The Apache httpd.conf directive "LogFormat" defines a log formatting
that can then be referenced using its name. The following 2 examples define the
log formats named: "combinedv" and "combined".
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %V"
combinedv
CustomLog pathtoyourlog/yourlog.log combinedv
Or the standard NCSA combined/XLF/ELF format (this format should already be
defined in the distribution httpd.conf file).
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
combined
CustomLog /yourlogpath/yourlogfile combined
The CustomLog item is required, if you want to use a specified LogFormat and
save the logs in a specific folder. Usually webmasters will want to save logs
for each site in the appropriate "site" folder.
Apache Preferred Awstats Custom Log Formats
Submitted by chris on January 31, 2006 - 00:10LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %V" combinedv
"Remote host" "Remote logname" "Remote user" "Time the request was received" "First line of request" "Status" "Size of response in bytes" "Referer" "User-Agent" "The server name"
0.0.0.0 in the Apache logs
Submitted by chris on March 14, 2009 - 12:48If was getting 0.0.0.0 in the Apache logs. To solve this on Windows 2000 I had to enable this directinve in the httpd.conf:
Win32DisableAcceptEx
