home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2004 March / PCWMAR04.iso / Software / Resources / Apache / apache_2.0.48-win32-x86-no_ssl.exe / F254352_mod_nw_ssl.xml < prev    next >
Encoding:
Text File  |  2003-05-04  |  1.7 KB  |  43 lines

  1. /note></dd>
  2.     </dl>
  3.  
  4.     <p>The second argument specifies what will be written to the
  5.     log file. It can specify either a <var>nickname</var> defined by
  6.     a previous <directive module="mod_log_config">LogFormat</directive>
  7.     directive, or it can be an explicit <var>format</var> string as
  8.     described in the <a href="#formats">log formats</a> section.</p>
  9.  
  10.     <p>For example, the following two sets of directives have
  11.     exactly the same effect:</p>
  12.  
  13.     <example>
  14.       # CustomLog with format nickname<br />
  15.       LogFormat "%h %l %u %t \"%r\" %>s %b" common<br />
  16.       CustomLog logs/access_log common<br />
  17.       <br />
  18.       # CustomLog with explicit format string<br />
  19.       CustomLog logs/access_log "%h %l %u %t \"%r\" %>s %b"
  20.     </example>
  21.  
  22.     <p>The third argument is optional and controls whether or
  23.     not to log a particular request based on the
  24.     presence or absence of a particular variable in the server
  25.     environment. If the specified <a href="../env.html">environment
  26.     variable</a> is set for the request (or is not set, in the case
  27.     of a '<code>env=!<var>name</var></code>' clause), then the
  28.     request will be logged.</p>
  29.  
  30.     <p>Environment variables can be set on a per-request
  31.     basis using the <module>mod_setenvif</module>
  32.     and/or <module>mod_rewrite</module> modules. For
  33.     example, if you want to record requests for all GIF
  34.     images on your server in a separate logfile but not in your main
  35.     log, you can use:</p>
  36.     
  37.     <example>
  38.       SetEnvIf Request_URI \.gif$ gif-image<br />
  39.       CustomLog gif-requests.log common env=gif-image<br />
  40.       CustomLog nongif-requests.log common env=!gif-image
  41.     </example>
  42. </usage>
  43. </directiv