upload apache
[bottlenecks.git] / rubbos / app / apache2 / manual / mod / mod_usertrack.html.en
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
4         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5               This file is generated from xml source: DO NOT EDIT
6         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7       -->
8 <title>mod_usertrack - Apache HTTP Server</title>
9 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
10 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
11 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
12 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
13 <body>
14 <div id="page-header">
15 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
16 <p class="apache">Apache HTTP Server Version 2.0</p>
17 <img alt="" src="../images/feather.gif" /></div>
18 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
19 <div id="path">
20 <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.0</a> &gt; <a href="./">Modules</a></div>
21 <div id="page-content">
22 <div id="preamble"><h1>Apache Module mod_usertrack</h1>
23 <div class="toplang">
24 <p><span>Available Languages: </span><a href="../en/mod/mod_usertrack.html" title="English">&nbsp;en&nbsp;</a></p>
25 </div>
26 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>
27 <em>Clickstream</em> logging of user activity on a site
28 </td></tr>
29 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
30 <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>usertrack_module</td></tr>
31 <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_usertrack.c</td></tr></table>
32 <h3>Summary</h3>
33
34     <p>Previous releases of Apache have included a module which
35     generates a 'clickstream' log of user activity on a site using
36     cookies. This was called the "cookies" module, mod_cookies. In
37     Apache 1.2 and later this module has been renamed the "user
38     tracking" module, mod_usertrack. This module has been
39     simplified and new directives added.</p>
40 </div>
41 <div id="quickview"><h3 class="directives">Directives</h3>
42 <ul id="toc">
43 <li><img alt="" src="../images/down.gif" /> <a href="#cookiedomain">CookieDomain</a></li>
44 <li><img alt="" src="../images/down.gif" /> <a href="#cookieexpires">CookieExpires</a></li>
45 <li><img alt="" src="../images/down.gif" /> <a href="#cookiename">CookieName</a></li>
46 <li><img alt="" src="../images/down.gif" /> <a href="#cookiestyle">CookieStyle</a></li>
47 <li><img alt="" src="../images/down.gif" /> <a href="#cookietracking">CookieTracking</a></li>
48 </ul>
49 <h3>Topics</h3>
50 <ul id="topics">
51 <li><img alt="" src="../images/down.gif" /> <a href="#logging">Logging</a></li>
52 <li><img alt="" src="../images/down.gif" /> <a href="#cookiedate">2-digit or 4-digit dates for cookies?</a></li>
53 </ul></div>
54 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
55 <div class="section">
56 <h2><a name="logging" id="logging">Logging</a></h2>
57
58
59     <p>Previously, the cookies module (now the user tracking
60     module) did its own logging, using the <code class="directive">CookieLog</code>
61     directive. In this release, this module does no logging at all.
62     Instead, a configurable log format file should be used to log
63     user click-streams. This is possible because the logging module
64     now allows multiple log files. The cookie itself is logged by
65     using the text <code>%{cookie}n</code> in the log file format. For
66     example:</p>
67 <div class="example"><p><code>
68 CustomLog logs/clickstream "%{cookie}n %r %t"
69 </code></p></div>
70
71     <p>For backward compatibility the configurable log module
72     implements the old <code class="directive"><a href="../mod/mod_log_config.html#cookielog">CookieLog</a></code> directive, but this
73     should be upgraded to the above <code class="directive"><a href="../mod/mod_log_config.html#customlog">CustomLog</a></code> directive. </p>
74 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
75 <div class="section">
76 <h2><a name="cookiedate" id="cookiedate">2-digit or 4-digit dates for cookies?</a></h2>
77
78
79     <p>(the following is from message
80     &lt;022701bda43d$9d32bbb0$1201a8c0@christian.office.sane.com&gt;
81     in the new-httpd archives) </p>
82 <pre>
83 From: "Christian Allen" &lt;christian@sane.com&gt;
84 Subject: Re: Apache Y2K bug in mod_usertrack.c
85 Date: Tue, 30 Jun 1998 11:41:56 -0400
86
87 Did some work with cookies and dug up some info that might be useful.
88
89 True, Netscape claims that the correct format NOW is four digit dates, and
90 four digit dates do in fact work... for Netscape 4.x (Communicator), that
91 is.  However, 3.x and below do NOT accept them.  It seems that Netscape
92 originally had a 2-digit standard, and then with all of the Y2K hype and
93 probably a few complaints, changed to a four digit date for Communicator.
94 Fortunately, 4.x also understands the 2-digit format, and so the best way to
95 ensure that your expiration date is legible to the client's browser is to
96 use 2-digit dates.
97
98 However, this does not limit expiration dates to the year 2000; if you use
99 an expiration year of "13", for example, it is interpreted as 2013, NOT
100 1913!  In fact, you can use an expiration year of up to "37", and it will be
101 understood as "2037" by both MSIE and Netscape versions 3.x and up (not sure
102 about versions previous to those).  Not sure why Netscape used that
103 particular year as its cut-off point, but my guess is that it was in respect
104 to UNIX's 2038 problem.  Netscape/MSIE 4.x seem to be able to understand
105 2-digit years beyond that, at least until "50" for sure (I think they
106 understand up until about "70", but not for sure).
107
108 Summary:  Mozilla 3.x and up understands two digit dates up until "37"
109 (2037).  Mozilla 4.x understands up until at least "50" (2050) in 2-digit
110 form, but also understands 4-digit years, which can probably reach up until
111 9999.  Your best bet for sending a long-life cookie is to send it for some
112 time late in the year "37".
113 </pre>
114
115 </div>
116 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
117 <div class="directive-section"><h2><a name="CookieDomain" id="CookieDomain">CookieDomain</a> <a name="cookiedomain" id="cookiedomain">Directive</a></h2>
118 <table class="directive">
119 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The domain to which the tracking cookie applies</td></tr>
120 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CookieDomain <em>domain</em></code></td></tr>
121 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
122 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
123 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
124 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_usertrack</td></tr>
125 </table>
126
127     <p>This directive controls the setting of the domain to which
128     the tracking cookie applies. If not present, no domain is
129     included in the cookie header field.</p>
130
131     <p>The domain string <strong>must</strong> begin with a dot, and
132     <strong>must</strong> include at least one embedded dot. That is,
133     <code>.foo.com</code> is legal, but <code>foo.bar.com</code> and
134     <code>.com</code> are not.</p>
135
136     <div class="note">Most browsers in use today will not allow cookies to be set
137     for a two-part top level domain, such as <code>.co.uk</code>,
138     although such a domain ostensibly fulfills the requirements
139     above.<br />
140
141     These domains are equivalent to top level domains such as
142     <code>.com</code>, and allowing such cookies may be a security
143     risk. Thus, if you are under a two-part top level domain, you
144     should still use your actual domain, as you would with any other top
145     level domain (for example, use <code>.foo.co.uk</code>).
146     </div>
147
148
149 </div>
150 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
151 <div class="directive-section"><h2><a name="CookieExpires" id="CookieExpires">CookieExpires</a> <a name="cookieexpires" id="cookieexpires">Directive</a></h2>
152 <table class="directive">
153 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Expiry time for the tracking cookie</td></tr>
154 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CookieExpires <em>expiry-period</em></code></td></tr>
155 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
156 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
157 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
158 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_usertrack</td></tr>
159 </table>
160     <p>When used, this directive sets an expiry time on the cookie
161     generated by the usertrack module. The <em>expiry-period</em>
162     can be given either as a number of seconds, or in the format
163     such as "2 weeks 3 days 7 hours". Valid denominations are:
164     years, months, weeks, days, hours, minutes and seconds. If the expiry
165     time is in any format other than one number indicating the
166     number of seconds, it must be enclosed by double quotes.</p>
167
168     <p>If this directive is not used, cookies last only for the
169     current browser session.</p>
170
171 </div>
172 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
173 <div class="directive-section"><h2><a name="CookieName" id="CookieName">CookieName</a> <a name="cookiename" id="cookiename">Directive</a></h2>
174 <table class="directive">
175 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Name of the tracking cookie</td></tr>
176 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CookieName <em>token</em></code></td></tr>
177 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CookieName Apache</code></td></tr>
178 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
179 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
180 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
181 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_usertrack</td></tr>
182 </table>
183     <p>This directive allows you to change the name of the cookie
184     this module uses for its tracking purposes. By default the
185     cookie is named "<code>Apache</code>".</p>
186
187     <p>You must specify a valid cookie name; results are
188     unpredictable if you use a name containing unusual characters.
189     Valid characters include A-Z, a-z, 0-9, "_", and "-".</p>
190
191 </div>
192 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
193 <div class="directive-section"><h2><a name="CookieStyle" id="CookieStyle">CookieStyle</a> <a name="cookiestyle" id="cookiestyle">Directive</a></h2>
194 <table class="directive">
195 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Format of the cookie header field</td></tr>
196 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CookieStyle
197     <em>Netscape|Cookie|Cookie2|RFC2109|RFC2965</em></code></td></tr>
198 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CookieStyle Netscape</code></td></tr>
199 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
200 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
201 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
202 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_usertrack</td></tr>
203 </table>
204     <p>This directive controls the format of the cookie header
205     field. The three formats allowed are:</p>
206
207     <ul>
208       <li><strong>Netscape</strong>, which is the original but now deprecated
209       syntax. This is the default, and the syntax Apache has
210       historically used.</li>
211
212       <li><strong>Cookie</strong> or <strong>RFC2109</strong>, which is the syntax that
213       superseded the Netscape syntax.</li>
214
215       <li><strong>Cookie2</strong> or <strong>RFC2965</strong>, which is the most
216       current cookie syntax.</li>
217     </ul>
218
219     <p>Not all clients can understand all of these formats. but you
220     should use the newest one that is generally acceptable to your
221     users' browsers. At the time of writing, most browsers only fully
222     support <code>CookieStyle Netscape</code>.</p>
223
224 </div>
225 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
226 <div class="directive-section"><h2><a name="CookieTracking" id="CookieTracking">CookieTracking</a> <a name="cookietracking" id="cookietracking">Directive</a></h2>
227 <table class="directive">
228 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables tracking cookie</td></tr>
229 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CookieTracking on|off</code></td></tr>
230 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CookieTracking off</code></td></tr>
231 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
232 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
233 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
234 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_usertrack</td></tr>
235 </table>
236     <p>When <code class="module"><a href="../mod/mod_usertrack.html">mod_usertrack</a></code> is loaded, and
237     <code>CookieTracking on</code> is set, Apache will send a
238     user-tracking cookie for all new requests. This directive can
239     be used to turn this behavior on or off on a per-server or
240     per-directory basis. By default, enabling
241     <code class="module"><a href="../mod/mod_usertrack.html">mod_usertrack</a></code> will <strong>not</strong>
242     activate cookies. </p>
243
244
245 </div>
246 </div>
247 <div class="bottomlang">
248 <p><span>Available Languages: </span><a href="../en/mod/mod_usertrack.html" title="English">&nbsp;en&nbsp;</a></p>
249 </div><div id="footer">
250 <p class="apache">Copyright 2009 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
251 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
252 </body></html>