Apache Custom Log Format
Posted
by Shishant
on Server Fault
See other posts from Server Fault
or by Shishant
Published on 2010-03-11T19:35:40Z
Indexed on
2010/03/11
19:39 UTC
Read the original article
Hit count: 255
Hello,
I am trying to write a reward system wherein users will be given reward points if they download complete files, So what should be my log format.
After searching alot this is what I understand its my first time and havent done custom logs before.
First of all which file should I edit for custom logs because this thing I cant find. I am using ubuntu server with default apache, php5 and mysql installation
# I use this commands and they work fine
nano /etc/apache2/apache2.conf
/etc/init.d/apache2 restart
I think this is what I need to do for my purpose
LogLevel notice
LogFormat "%f %u %x %o" rewards
CustomLog /var/www/logs/rewards_log rewards
This is as it is command or there is something missing? and is there any particular location where I need to add this?
and one more thing %o
is for filesize that was sent and is it possible to log only files from a particular directory? or for files with size more than 10mb.
Thank You.
© Server Fault or respective owner