SHARE
Facebook X Pinterest WhatsApp

Apache Guide: Logging with Apache–Understanding Your access_log Page 3

Written By
thumbnail Rich Bowen
Rich Bowen
Jul 20, 2010
ServerWatch content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More



The seventh and final piece of information is the total number of bytes
that were transferred to the client. This can tell you if a transfer
was interrupted (if the number is different from the size of the file).
Adding them up will tell you how much data your server transferred in a
day, or week, or whatever.

Setting the location of your access_log

Where the access_log is located is actually a configuration option.
If you look in your configuration file, httpd.conf, you should see
a line that looks like the following:

        CustomLog /usr/local/apache/logs/access_log common

Note: If you're running an older version of Apache, this line might
look a little different. It might be the TransferLog directive instead
of the CustomLog directive. If that is the case, I really recommend
that you upgrade if at all possible.

The CustomLog directive specifies where a particular log file should
be stored, and what format that log should be in. Next week we'll talk
about custom log formats. The log format described above is the common
log format, which has been in use as the standard since the beginning of
web servers. That's why it still contains the ident information field,
even though almost no clients actually pass that information to the
server.

The path specified there is the location of the log file. Note that this
location should be secured against random users writing to it, since the
log file is opened by the HTTP user (specified with the User directive),
and so this is potentially a security problem.

Upcoming articles

In my next few articles, I'll be talking about the following subjects: Custom
log format. Logging to a process, rather than to a file. The error log.
Getting useful statistics out of your log files. And whatever else you
fine readers suggest to me.

Thanks for reading. Please send me a note at ApacheToday@rcbowen.com if
you have any suggestions or comments.

Want to discuss log files with other Apache Today readers? Then check out the PHP discussion at Apache Today Discussions.

thumbnail Rich Bowen

Rich Bowen is a ServerWatch contributor.

Recommended for you...

What Is a Container? Understanding Containerization
What Is a Print Server? | How It Works and What It Does
Nisar Ahmad
Dec 8, 2023
What Is a Network Policy Server (NPS)? | Essential Guide
Virtual Servers vs. Physical Servers: Comparison and Use Cases
Ray Fernandez
Nov 14, 2023
ServerWatch Logo

ServerWatch is a top resource on servers. Explore the latest news, reviews and guides for server administrators now.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.