Reading the web log?
Hi,
I would like to easily access and read my servers web logs on a Suse 9.xx server. I am trying to determine how many people read 1 image in particular and thus would like to check the web log to see how many times it was loaded. How would I go about this? I have full putty access... So far I have found /var/log but I could not make sense of the logs in there... Thank you for your help in advance! Edit*: I also checked the /var/log/apache2/access_log file but although it looked like it recorded any requests for my file. PS: Is there a way to change the output of those log files to a "cleaner" look? You know, timestamp on the left and record on the right? |
for image: your_image.gif
view all time access: cat /var/log/apache2/access_log | grep 'your_image.gif' access for today cat /var/log/apache2/access_log | grep 'your_image.gif' | grep '13/Apr/2007' ... |
or even
cut -f 7,4 -d ' ' /var/log/apache2/access.log | grep 'your_image.gif' | grep '13/Apr/2007' |
Thank you, I tried that but with the grep command simply nothing happens. Thats for both the image and the date.
I downloaded the whole access_log and search in it using notepad but couldn't find a reference to the image ((Try it here). Does this log really record all acces? |
open this in putty
# tail -f /var/log/apache2/access.log and try to open this image directly inside browser: http://yourhost.net/.../yourimage.gif putty output should updates if not then maybe this image was cached with your browser. Clean cache and try again ... |
It should be 2 case to check for this.
First, if it is the only web site you host check following line in your httpd.conf, is it point to the correct log file? Quote:
Quote:
|
Quote:
Quote:
Thanks for your help! |
All times are GMT -5. The time now is 02:05 AM. |