section31 Posted April 19, 2005 Posted April 19, 2005 (edited) A few questions regarding the apache raw access logs. Whats the easiest way to access them via a php script or something. I know you can have them archive onto your logs directory after every month, but what about the current log. I can only find 2 places where I can access them. 1. Under http://****:2082/getaccesslog/acce...in-4-19-2005.gz password protected by cpanel. ( So I'm guessing it could be possible If i were to manually send post request varirables [username and password] ) 2. The other place is via ftp. Under the username username_logs. So are these the only two places I can access them, and do they always accumulate by month. I figure this is just the way you have them setup. By month rather than by day right? Thanks, Dave EDIT: By the way, I have 2 accounts and I can't seem to access one through ftp. I'm probably going to submit a help desk ticket to see whats up with that. I'm almost certain it has to do with the my domain name change around a year ago. Edited April 19, 2005 by section31 Quote
TCH-Bruce Posted April 19, 2005 Posted April 19, 2005 Sorry Dave, I only know how to access the logs through cPanel. Maybe someone else has some ideas. Quote
annie Posted April 19, 2005 Posted April 19, 2005 Check this one: I believe it's in this location here: /usr/local/apache/domlogs/domain.com Remember to replace domain.com with the name of your domain. And if your TLD is info, then it would be domain.info Good luck! Quote
section31 Posted April 19, 2005 Author Posted April 19, 2005 Nope, I couldn't find it in there. Quote
annie Posted April 20, 2005 Posted April 20, 2005 You won't be able to access the logs there except through a script. Cron works well. Quote
section31 Posted April 20, 2005 Author Posted April 20, 2005 (edited) I know this is what I did. ><? $file = '/usr/local/apache/domlogs/mydomain'; header('Content-type: application/force-download'); header('Content-Transfer-Encoding: Binary'); header('Content-disposition: attachment; filename="'.$file.'"'); readfile($file); ?> Edited April 20, 2005 by section31 Quote
TCH-Andy Posted April 20, 2005 Posted April 20, 2005 did you use /your_tch_domain or /your_tch_domain.com ? It does need the correct TLD as an 'extension'. If that does not work, submit a ticket to the help desk, and ask us to provide a symbolic link (alias) to that file within your account for you. Quote
section31 Posted April 20, 2005 Author Posted April 20, 2005 (edited) Yeah I did add the tld. I'll go ahead and submit that help desk ticket in a while, but do you happen know if the log is for current month only or is there a place to access daily logs too...Just curious. Edited April 20, 2005 by section31 Quote
annie Posted April 21, 2005 Posted April 21, 2005 Logs grow monthly. If you want daily logs, then use my scripts, run it via cron and download the day after. Quote
section31 Posted April 22, 2005 Author Posted April 22, 2005 (edited) Yup, your script looks like it will work nicely. Thanks Edited April 22, 2005 by section31 Quote
section31 Posted April 25, 2005 Author Posted April 25, 2005 Just got this settled through the help desk. I have no idea why you guys have access to your domlogs and I don't. The tech had to change the path of the domlogs to my home directory for me to access it. Oh well, its all good now. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.