File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / lighttpd / doc / outdated / accesslog.txt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Oct 14 10:32:48 2013 UTC (11 years, 5 months ago) by misho
Branches: lighttpd, MAIN
CVS tags: v1_4_41p8, v1_4_35p0, v1_4_35, v1_4_33, HEAD
1.4.33

    1: =========
    2: Accesslog
    3: =========
    4: 
    5: ---------------------
    6: Module: mod_accesslog
    7: ---------------------
    8: 
    9: :Author: Jan Kneschke
   10: :Date: $Date: 2013/10/14 10:32:48 $
   11: :Revision: $Revision: 1.1.1.1 $
   12: 
   13: :abstract:
   14:   The accesslog module ...
   15: 
   16: .. meta::
   17:   :keywords: lighttpd, accesslog, CLF
   18: 
   19: .. contents:: Table of Contents
   20: 
   21: Description
   22: ===========
   23: 
   24: CLF like by default, flexible like apache
   25: 
   26: Options
   27: =======
   28: 
   29: accesslog.use-syslog
   30:   send the accesslog to syslog
   31: 
   32:   Default: disabled
   33: 
   34: accesslog.filename
   35:   name of the file where the accesslog should be written too if syslog
   36:   is not used.
   37: 
   38:   if the name starts with a '|' the rest of the name is taken
   39:   as the name of a process which will be spawn and will get the
   40:   output
   41: 
   42:   e.g.: ::
   43: 
   44:     accesslog.filename = "/var/log/lighttpd.log"
   45: 
   46:     $HTTP["host"] == "mail.example.org" {
   47:       accesslog.filename = "|/usr/bin/cronolog"
   48:     }
   49: 
   50:   Default: disabled
   51: 
   52: accesslog.format
   53:   the format of the logfile
   54: 
   55:   ====== ================================
   56:   Option Description
   57:   ====== ================================
   58:   %%     a percent sign
   59:   %h     name or address of remote-host
   60:   %l     ident name (not supported)
   61:   %u     authenticated user
   62:   %t     timestamp for the request-start
   63:   %r     request-line
   64:   %s     status code
   65:   %b     bytes sent for the body
   66:   %i     HTTP-header field
   67:   %a     remote address
   68:   %A     local address
   69:   %B     same as %b
   70:   %C     cookie field (not supported)
   71:   %D     time used in ms (not supported)
   72:   %e     environment (not supported)
   73:   %f     phyiscal filename
   74:   %H     request protocol (HTTP/1.0, ...)
   75:   %m     request method (GET, POST, ...)
   76:   %n     (not supported)
   77:   %o     `response header`_
   78:   %p     server port
   79:   %P     (not supported)
   80:   %q     query string
   81:   %T     time used in seconds
   82:   %U     request URL
   83:   %v     server-name
   84:   %V     (not supported)
   85:   %X     connection status
   86:   %I     bytes incomming
   87:   %O     bytes outgoing
   88:   ====== ================================
   89: 
   90:   If %s is written %>s or %<s the < and the > are ignored. They are support
   91:   for compat with apache.
   92: 
   93:   %i and %o expect the name of the field which should be written in curly brackets.
   94: 
   95:   e.g.: ::
   96: 
   97:     accesslog.format = "%h %l %u %t \"%r\" %b %>s \"%{User-Agent}i\" \"%{Referer}i\""
   98: 
   99:   Default: CLF compatible output
  100: 
  101: Response Header
  102: ---------------
  103: 
  104: The accesslog module provides a special way to log content from the
  105: application in a accesslog file. It can be used to log the session id into a
  106: logfile.
  107: 
  108: If you want to log it into the accesslog just specify the field-name within
  109: a %{...}o like ::
  110: 
  111:   accesslog.format = "%h %l %u %t \"%r\" %b %>s \"%{User-Agent}i\" \"%{Referer}i\" \"%{X-LIGHTTPD-SID}o\""
  112: 
  113: The prefix ``X-LIGHTTPD-`` is special as every response header starting with
  114: this prefix is assumed to be special for lighttpd and won't be sent out
  115: to the client.
  116: 
  117: An example the use this functionality is provided below: ::
  118: 
  119:   <?php
  120: 
  121:   session_start();
  122: 
  123:   header("X-LIGHTTPD-SID: ".session_id());
  124: 
  125:   ?>
  126: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>