Computer System

 Server Log Files


A server log is a log file (or several files) automatically created and maintained by a server consisting of a list of activities it performed.

A typical example is a web server log which maintains a history of page requests. The W3C maintains a standard format (the Common Log Format) for web server log files, but other proprietary formats exist. More recent entries are typically appended to the end of the file. Information about the request, including client IP address, request date/time, page requested, HTTP code, bytes served, user agent, and referrer are typically added. This data can be combined into a single file, or separated into distinct logs, such as an access log, error log, or referrer log. However, server logs typically do not collect user-specific information.

The Common Log Format,[1] also known as the NCSA Common log format, (after NCSA_HTTPd) is a standardized text file format used by web servers when generating server log files. Because the format is standardized, the files can be readily analyzed by a variety of web analysis programs, for example Webalizer and Analog.

Each line in a file stored in the Common Log Format has the following syntax:

host ident authuser date request status bytes

Example

127.0.0.1 user-identifier frank [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326

A "-" in a field indicates missing data.

·        127.0.0.1 is the IP address of the client (remote host) which made the request to the server.

·        user-identifier is the RFC 1413 identity of the client. Usually "-".

·        frank is the userid of the person requesting the document. Usually "-" unless .htaccess has requested authentication.

·        [10/Oct/2000:13:55:36 -0700] is the date, time, and time zone that the request was received, by default in strftime format %d/%b/%Y:%H:%M:%S %z.

·        "GET /apache_pb.gif HTTP/1.0" is the request line from the client. The method GET/apache_pb.gif the resource requested, and HTTP/1.0 the HTTP protocol.

·        200 is the HTTP status code returned to the client. 2xx is a successful response, 3xx a redirection, 4xx a client error, and 5xx a server error.

·        2326 is the size of the object returned to the client, measured in bytes.

Usage

Log files are a standard tool for computer systems developers and administrators. They record the "what happened when by whom" of the system. This information can record faults and help their diagnosis. It can identify security breaches and other computer misuse. It can be used for auditing. It can be used for accounting purposes.

 

Default Log file location of web server in Windows Operating System:

IIS web server: %SystemDrive%:\inetpub\logs\LogFiles

XAMPP web server: %SystemDrive%:\xampp\apache\logs

XAMPP web server MySql: %SystemDrive%:\xampp\mysql\data\mysql.log 

WAMP web server: %SystemDrive%:\wamp\logs\access.log

WAMP web server MySQL: %SystemDrive%:\wamp\logs\mysql.log
WAMP web server MariaDB: %SystemDrive%:\wamp\logs\mariadb.log
WAMP web server MariaDB: %SystemDrive%:\wamp\logs\apache_error.log
WAMP web server MariaDB: %SystemDrive%:\wamp\logs\mariadb.log
 
 N.B. %SystemDrive% means installed drive such as C or D ....


Default Log file location of web server in CentOS or RHEL Operating System:

Apache web server httpd: /var/log/httpd/