586Part IIIAdvanced Features and TechniquesThe (Web server on xp) Common Log FormatBy
586Part IIIAdvanced Features and TechniquesThe Common Log FormatBy default, entries in the Apache error.log file use the standardized Common Log Format. Entries in this format each correspond to a single instance of request/response activity(requests and responses are, after all, what HTTP servers handle). For example, one linemight correspond to a request for an HTML page (and its subsequent service by Apache). The next line might correspond to the (automatic) request for and service of a JPEG fileembedded in that HTML document. In any case, Common Log Format entries look like this (in a single line): 192.168.100.1 - david [10/Nov/2003:18:00:30 -1100] GET /index.html HTTP/1.0 200 6590The most important elements of that line are: .192.168.100.1: The IP address of the client making the HTTP request. .david: The username of the authenticated user making the request. .[10/Nov/2003:18:00:30 -1100]: The date, time, and UTC offset of the request. .GET: The nature of the HTTP request: GET or POST. .index.html: The requested file. .HTTP/1.0: Version of the HTTP protocol used for the request. .200: Response code describing the result of the request (more on this later in this section). .6590: The number of bytes served out in HTTP response corresponding to this request. You ll find a more complete treatment of Apache log files, including the more obscure elementsof the Common Log Format, at http://httpd.apache.org/docs/logs.html#errorlog. HTTP response codesThough there are many HTTP response codes (the most famous being the 404 Not Found error), they exhibit a pattern that aids rapid decoding. In a nutshell: .200-series codes indicate success. .300-series codes indicate a redirection. .400-series codes indicate a client-side error (like a request for a nonexistent document). .500-series codes indicate a server-side error. You ll find a full list of HTTP response codes at www.w3.org/Protocols/rfc2616/rfc2616- sec10.html. Monitoring Apache logs with tailUnder Unix (including Linux), you usually have access to the GNU text utility suite. When it stime to monitor log files, one of the most useful of these tools is tail. In its default behavior, tailwill return the last (that is, most recent) 10 lines of a specifiedfile. You can use it like this: tail access.log36
In case you need affordable webhost to host your website, our recommendation is ecommerce web host services.