Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Danksi

macrumors 68000
Original poster
Oct 3, 2005
1,554
0
Nelson, BC. Canada
I'm using my iMac's site folder/apache functionality for video file downloads that are too big for my webhosting.

I was wondering whether or not there were any logs that would allow me to see who's downloaded files, when, how many bytes etc..?
 

tag

macrumors 6502a
Apr 29, 2005
918
9
Danksi said:
I'm using my iMac's site folder/apache functionality for video file downloads that are too big for my webhosting.

I was wondering whether or not there were any logs that would allow me to see who's downloaded files, when, how many bytes etc..?


Yes all activity should be logged by default. The logs can be found via terminal or Console at '/var/log/httpd/'. In that directory there is 'access_log' which shows access info, and the 'error_log' which shows errors/notices that apache encounters.

For a brief rundown on the access_log (which is what you will be using for what you want to find out) here is an example

Code:
127.0.0.1 - - [21/Nov/2005:14:38:33 -0500] "GET /apache_pb.gif HTTP/1.1" 200 2326
127.0.0.1 - - [21/Nov/2005:14:38:34 -0500] "GET /favicon.ico HTTP/1.1" 404 289

The first part is the IP address of who accessed your site
The second part obviously is the date ;)
Third part in quotes tells of the request string 'ie GET, POST ...'
Fourth part (the first set of numbers) is the Response by your server (200 means success, 404 means not successful in retrieving data)
Fifth part (second set of numbers) is the file size of the response ( so say someone downloaded a video from you, this would be alot of bytes)(ie. 234234234)

If you need more info than this or some programs that can automate the process of checking logs, here is a nice little snippet from a guide all about Apache...

http://www.samspublishing.com/library/content.asp?b=Mac_OS_X_Unleashed&seqNum=211&rl=1
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.