Home arrow Site Administration arrow Page 5 - Getting More Out Of Apache (Part 2)

Timmmmmmbbbbberrrr! - Administration

Learn more about the world's best-loved Web server, with examplesof Apache's authentication and logging capabilities, and also pay a briefvisit to its unique URL re-writing module.

TABLE OF CONTENTS:
  1. Getting More Out Of Apache (Part 2)
  2. Eyes Only
  3. Identity Check
  4. Grouping Things Together
  5. Timmmmmmbbbbberrrr!
  6. When Things Go Wrong
  7. Just Rewrite It!
  8. Putting It Into Practice
By: icarus, (c) Melonfire
Rating: starstarstarstarstar / 1
January 23, 2001

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement
You may not know this, but Apache comes with some pretty impressive loggingcapabilities, which allow you to record demographic information aboutvisitors to your Web site. And these logging capabilities can be customizedto deliver exactly the information you need for later analysis.

Apache comes with two types of logs: there's the "access log", which trackseach and every request made to the Web server, and the "error log", whichtracks internal server errors, missing file and the like. There are anumber of configuration directives in the "httpd.conf" file which allow youto control Apache's default logging behaviour.

The ErrorLog directive specifies the location of the error log.

ErrorLog logs/error.log
The CustomLog directive specifies the location of the server's access log,together with a format for the log file (as defined in the LogFormatdirective). The default setting is the Common Logfile Format, whichplaces each request on a separate line; this format records the IP address,the date and time, the bytes sent, and the first line of the client request.

LogFormat "%h %l %u %t \"%r\" %>s %b" common CustomLog logs/access.log common
The variables that you see in the LogFormat directive are server variablesthat return various identifiers for each client request - you can use theseto create your own log format. More information about each variabledoes can be obtained from the Apache manual athttp://httpd.apache.org/docs/mod/mod_log_config.html#customlog , or fromthe list below.

%h - requesting host

%b - bytes sent

%{VARNAME}e - value of environment variable VARNAME

%t - timestamp

%h - remote host

%T - time taken to serve request (seconds)

%U - URL requested

%s - return code for request

%{User-agent}I - remote user agent identifier

 
 
>>> More Site Administration Articles          >>> More By icarus, (c) Melonfire
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

SITE ADMINISTRATION ARTICLES

- Coding: Not Just for Developers
- To Support or Not Support IE?
- Administration: Networking OSX and Win 7
- DotNetNuke Gets Social
- Integrating MailChimp with Joomla: Creating ...
- Integrating MailChimp with Joomla: List Mana...
- Integrating MailChimp with Joomla: Building ...
- Integrating MailChimp with Joomla
- More Top WordPress Plugins for Social Media
- Optimizing Security: SSH Public Key Authenti...
- Patches and Rejects in Software Configuratio...
- Configuring a CVS Server
- Managing Code and Teams for Cross-Platform S...
- Software Configuration Management
- Back Up a Joomla Site with Akeeba Backup

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: