Log Apache

From Tuxunix
Jump to: navigation, search

Format log

  1.  %V The server name according to the UseCanonicalName setting. Useful for virtual hosting servers.
  2.  %h Remote host
  3.  %l Remote logname (from identd, if supplied). This will return a dash unless mod_ident is present and IdentityCheck is set On.
  4.  %u Remote user (from auth; may be bogus if return status (%s) is 401)
  5.  %t Time the request was received (standard English format)
  6.  %r First line of request
  7.  %>s status. For requests that got internally redirected, this is the status of the *original* request --- %>s for the last.
  8.  %b Size of response in bytes, excluding HTTP headers. In CLF format, i.e. a '-' rather than a 0 when no bytes are sent.
  9.  %{Referer}i The contents of Foobar: header line(s) in the request sent to the server.
  10.  %{User-Agent}i
  11.  %{Foorbar}C The contents of cookie Foobar in the request sent to the server.
  12.  %P The process ID of the child that serviced the request.
  13.  %D The microseconds of time taken to serve the request.
   LogFormat "%V %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %P %D" vcombinedwithPD
   SetEnvIf Request_URI "^/favicon\.ico$" dontlog
   SetEnvIf User-Agent "libwww-perl.*" dontlog
   SetEnvIf User-Agent ".*internal dummy connection.*" dontlog
   CustomLog logs/access_log vcombinedwithPD env=!dontlog