Archive
| Su | Mo | Tu | We | Th | Fr | Sa | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 2 | 3 | |||||||||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 | |||||||
| 11 | 12 | 13 | 14 | 15 | 16 | 17 | |||||||
| 18 | 19 | 20 | 21 | 22 | 23 | 24 | |||||||
| 25 | 26 | 27 | 28 | 29 | 30 | 31 | |||||||
Newsletter
Poll: server
The Apache log files are basically designed to give the user feedback on the activity, performance, and problems that may be occurring on the server. To do this, Apache offers various, comprehensive logs such as the ErrorLog and the AccessLog as well as offering flexible logging capabilities in the Apache HTTP Server. Here is a quick guide to these useful logs.
Prior to entering the Error or AccessLogs, it is advisable to check the CustomLog and LogFormat directives. The first can specify the location and content of the reported logs and the second can specify the selection and content, respectively. The logs are both very straightforward and easy to edit. Certain information may be unnecessary to what the user is looking for so simply edit a few settings and the logs will be outputted just how they are wanted.
Obviously, the ErrorLog is the most important log and should be given the most attention. The Apache httpd will send diagnostic information and record any errors that it encounters in processing requests. After any server error, it is important to check the ErrorLog to try and find out where the error originated from and the ErrorLog will even offer details on the error and what to do to fix it. The AccessLog, on the other hand, records all requests made to the server. Although not especially important to check for most, the AccessLog is useful for checking on who is visiting the site and other relative information. The last log worth mentioning in this short guide is the Rewrite Log. Mod_rewrite has become incredibly popular recently due to SEO, or Search Engine Optimization. The RewriteLog gives details on how the server is processing those changes and can be quite useful.
Handling these logs is very important. Even servers hosting small amounts of information can build up huge log files over time. In general, a log file increases by 1MB per 10,000 requests. For this reason, it is important to keep an eye on these logs and rotate/delete them. Apache will continue to write in the same log basically forever until it is told otherwise. Basically, when the user would like to delete the log, the best way to go is to tell the server to undergo a graceful restart, which will make it write in a new log without losing the connection with clients accessing the server. Once the new log file has been created, the old log file can be deleted, moved, examined, etc.
Indeed, Apache offers intricate yet very simple and easy to read log files. These files should be examined occasionally, particularly the ErrorLog, and they also need to be managed so that the server doesn’t become too cluttered with old logs.







Articles



