github.com/krum110487/go-htaccess@v0.0.0-20240316004156-60641c8e7598/tests/data/apache_2_2_34/manual/mod/mod_usertrack.html.en (about)

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