Oct
23
2009
Uncategorized

Apache Log Format.

Apache logs :

Actually we have two types of log files in the apache server.

1. Access_log – used to store the information ,regarding the request served by the server.
2. error_log    -  used to store the error information.

we can able to customize our own log format.

sample code:

LogFormat “%h %l %u %t \”%r\” %>s %b” common
LogFormat “%h %l %u %t \”%r\” %>s %b”
\”%{Referer}i\” \”%{User-agent}i\”” combined

%h: The IP address of the client that sent the request to the web server, or the client’s hostname if you have HostNameLookups enabled
%u: The user id of the user who sent the request determined by HTTP authentication
%t: Time when the request was received by the server.
%r: Text of the original request line from the client including the HTTP method used, the resource requested, and the HTTP protocol version used by the client’s browser
%>s: The final HTTP request status code that the web server sends back to the client
%b: The size in bytes of the object sent to the client in response to the request excluding the response headers

About the Author:

Leave a comment

 

October 2009
M T W T F S S
    Jul »
 1234
567891011
12131415161718
19202122232425
262728293031  
  Domain Name + 1GB Linux India Web Hosting in Rs.349