13.06.2015 Views

Introduction to the Apache Web Server - ApacheCon

Introduction to the Apache Web Server - ApacheCon

Introduction to the Apache Web Server - ApacheCon

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Section 16<br />

Logging<br />

Every request <strong>to</strong> your server results in an entry in a log file. If something goes wrong, it will also result<br />

in an entry in <strong>the</strong> error log file. This means that you always have a “paper trail” for everything that goes<br />

on on your server, so that you can look back and find out what happened. This is primarily useful for two<br />

purposes - troubleshooting, and statistics ga<strong>the</strong>ring.<br />

In this chapter, we look at <strong>the</strong> standard log files, as well as at <strong>the</strong> cus<strong>to</strong>m log files which you can create <strong>to</strong><br />

fit non-standard needs.<br />

16.1 Standard log files<br />

/usr/local/apache/logs/access log<br />

First we look at a standard default access log, in Common log format (CLF). While many third-party<br />

bundlings of <strong>Apache</strong> ship with <strong>the</strong> Combined log format instead, this is still <strong>the</strong> most common log format,<br />

and <strong>the</strong> Combined is just an extension of it.<br />

16.1.1 access log<br />

Format ...<br />

216.35.116.91 - - [19/Aug/2000:14:47:37 -0400] "GET / HTTP/1.0" 200 654<br />

• 216.35.116.91 Client address (See HostNameLookups)<br />

• - (placeholder) Ident (always blank)<br />

• - (placeholder) Username<br />

• [19/Aug/2000:14:47:37 -0400] - Date/time<br />

97

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!