Apache has documents that provide a detailed index of the log format, the following are some of the most important domains:
Normal log format:
%H: When a client (for example, a browser) makes a connection request to the server, its own IP address or domain name (to open hostnamelookups).
%u: The number of the user under the record when authenticating a user using the HTTP method.
%t: The time the server receives the connection request.
%r: The textual information from the original connection request issued by the client, containing the HTTP method used.
%>s: The return status code after the server answers the browser, 200 indicates the request was successful.
%b: The content size (in bytes) of the postback object of a single request sent by the server answering browser, not counting packet header bytes.
The consolidated log format expands two additional domains based on the common log format:
%{referer}i: The header of the connection request packet, which contains the document association information that points to the current page. (Why should I have "I"?) )
%{user-agent}i: The user Agent connection request packet header, which contains information about the client's browser. (Why should I have "I"?) )
For example (the following common1 and combined1 can be freely named by you, note that it is possible that Apache configuration does not accept numbers, I am here just to cite an obvious example: p):
Logformat "%h%l%u%t/"%r/"%>s%b" Common1
Logformat "%h%l%u%t/"%r/"%>s%b/"%{referer}i/"/"%{user-agent}i/"" combined1 "
-----------------------------------
setenvif Request_uri "(/.gif|/.jpg) $ image1
Customlog Logs/access_ Log logformat-defined named Env=!image1 (without recording images in GIF and JPEG format)
setenvif remote_addr 192/.168/.200/.5 specialmachine1
Transferlog Logs/sample.log (automatically accept the definition provided by the last Logformat Directive) ENV=SPECIALMACHINE1 (record specific IP address)
Setenvifnocase Referer www /.example/.com Internalreferral1 (satisfies the condition if the www.example.com site is not linked)