Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I enable W3C extended log format on LAMP and where will the default log directory be located (and named what)? (or XAMPP)

share|improve this question
up vote 1 down vote accepted

You probably mean the W3C extended log format:
Correcting your spelling and rephrasing your question may get you more answers.

This format is mostly used on Microsoft IIS servers. I'm not sure whether all required data is available in Apache and I couldn't find an example format string for you.

Simply put, you need to define the desired LogFormat in your Apache config, and then use the CustomLog option to specify where to write the logfile. Usually, depending on the settings, Apache writes its logs to /var/log/apache/, /var/log/apache2/ or /var/log/httpd/ but check your Apache config to find out.

Since the W3C extended format is free form, there is no single answer, but the NCSA extended log format, which is similar to the W3C format, looks like this:

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" ncsa_extended
CustomLog /var/log/apache2/extended_access_log ncsa_extended

You can customize the parameters of LogFormat to get the info you want.

share|improve this answer
thank you! actually ironically, that was the original title of my post, i changed it today to shorten it, and now i get the first answer :) . actually all I'm looking for is the c-referrer and the full path requested, so I think I can figure it out from here - I did not no the option was unavailable outside of IIS (where obviously, I first met it and assumed it was universal) – nona urbiz Sep 7 '09 at 22:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.