|
Apache |
|
Apache is configured through a text file that contains many other settings that are beyond the scope of this document. The settings relating to logfiles are:
LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog /var/log/httpd/access combined
The first line defines a log format named 'combined' containing the fields in the order specified. The second line ties the named format to the actual file name to be used when writing the information.
Other fields may be present in the logfile, and the order of fields is not critical.
Most Apache installations are similar to the above and require no further modification.
Logging cookies
If your site is setting cookies either through the built-in session cookie of a scripting language like PHP, or your own custom cookie, you'll get better results through ClickTracks if the cookies are present in the log. Modify your log format line like this :
LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{cookie}i\"" combined
For more information see How ClickTracks Uses Cookies