Jan
14
2011

All About Apache Logs – Error and access Logs

If you need to use Apache, you need to know what the error messages mean. The standard access log stores information about http requests, time results, headers , etc. The standart error log stores information about every unexpected warning, error and anyother anomaly that happens on the server plus every errors induced by Perl CGI scripts.

How to open Apache logs?

You can access to apache logs by opening your log file in a text editor. For windows: Apache install dirlogs folder and for Debian / Ubuntu Linux – /var/log/apache2 and for Red Hat Linux – /var/log/httpd/ . The windows users can watching the statistic in real time, so they need to open/close document for checking for new updates. For linux you can type: tail –f logfile to stream activity in a terminal in real time.
Remember that some Linux versions auto-rotate the apache log files on daily basic ( or week, month, etc ). That mean that your entries in error.log or access.log may shows only your logs from today. In this case you can find your log from “yesterday” as: access.log.1 or error.log.1 and so on.
To configure your auto-rotate functions, you should go in: etc/logrotate.d/apache2 on Debian or Ubuntu, or
/etc/logrotate.d/httpd on Red Hat.

Activity Log

The activity log is saved in the log directory as access.log or access_log file.
It describes all web based transactions that apache server has responded to.
An example for activity log:
remote_host – - [timestamp] “GET URL HTTP/1.1”
result bytes

In this format we can understand the remote host ip address or hostname, the remote logname, the remote username, the HTTP request, the timestamp on the request and the number of bytes transferred. This represents the apache common log format, but apache also provides a combined log format, which extends the common format that adding – reffering url address and user-agent environment values.

The Error Log

You can find your error log in error.log or error_log in your apache directory. It shows any error messages triggered by any failed Web-Based transactions, that apache server could not respond to.

[timestamp] [type] [client remote_host] Error
message text

The error line describes the timestamp of the request, the type of failure ( info, warning or error ), the REMOTE HOST IP address or hostname, and the raw error text describing the failure.
Our example text error log is in free form format, meaning that there is no set formatting standart that is followed. The error message text is usually generated by the program being executed. For example is cgi perl script failed with syntax error, you would see the error description in the log EXACTLY as it would be presented if you run your cgi script in command line.

Enter Your Mail Address

Incoming search terms:

Related And Similar Posts

Leave a comment

*

Facebook Fans

Share Me With Google Plus!

Popular Posts

Social Bookmarking sites list 2012 - New and fresh bookmarking sites
Comments93
Bulgarian proxy or how to open arenabg and zamunda
Comments65
+ 150 New Free Directory Sites List 2012 - Sorted by Page Rank
Comments22
Scrapebox crack free download ?
Comments19
Great List With Google Plus / FB likes/ tweets exchange sites - Hot Topic
Comments16
How to make World Of Warcraft Cataclysm Server
Comments10
The Best Bulgarian Torrents - Listing
Comments9
500 Free Directory List 2011 !
Comments9
Free RSS Directory List Where To Submit Your Site
Comments9
Guest Blogs List and Useful Information
Comments8

Recent Posts

Calendar

January 2011
M T W T F S S
« Dec   Feb »
 12
3456789
10111213141516
17181920212223
24252627282930
31