Jason Brice

Active Member
Sep 29, 2001
44
0
306
Hi,

I'm a reseller and don't have root access so this may complicate what I'm about to ask.

The I own the largest site on my server, and it currently does about 50Gb of traffic a month.

When I try to access the raw log files from CPanel using :2082/getaccesslog/ towards the end of the month the download quite often times out and I get only part of the logs.

Is there a way to telnet in and build the logs into a gzip in my root, and then ftp them down?

Any other solutions? It's getting quite annoying as I am finding it difficult to sell advertising without accurate traffic reporting.
 

awsol

cPanel Test Bitch
Feb 8, 2002
591
0
316
Boston MA
Contact your provider and tell them to do the following

mkdir /home/USERNAME/logs

pico httpd.conf

hit control + W and then type the username to search within the apache config

Change

CustomLog domlogs/DOMAIN.com combined
to
CustomLog /home/USERNAME/logs/DOMAIN.com combined

Hit control + O then Enter

Now just to be safe have them do this

chown USERNAME.USERNAME /home/USERNAME/logs/domain.com


Then tell them to restart apache just to make sure it all works right. That way it don't crash while they're AFK. Rather have it crash while they're there.


Now all you have to do is login via FTP and change directories to logs and download the file. This will be in realtime so you can use webtrends or your favorite traffic generator.

Also tell them to replace USERNAME with your correct username. And domain.com with your domain.

I do this for a bunch of my clients. You will be happy with how it works.

Good luck and may business bring you great pleasure.
 

Jason Brice

Active Member
Sep 29, 2001
44
0
306
Thanks!

:)

I will pass this on to my provider. Hopefully they'll be able to get it sorted soon!
 

Jason Brice

Active Member
Sep 29, 2001
44
0
306
Okay, got some additional questions...

I gzipped the file to download it, but then found that once I'd removed the file the logs didn't start building themselves again in the /logs directory. I had to get my provider to run your routine again. I'd have expected that the logs would start a new in the directory if there wasn't one there, but they didn't.

Also, I'm concerned that uncompressed they will grow to a huge size in my user area.

I'm not so good with cron jobs, but would it be possible to run one that would compress the logs into a daily chunk, and still allow them to continue building uninterupted in the logs area? Way back when I started running my site at hypermart.net they provided a facility like that.

Any suggestions?
 

martekbiz

Member
Mar 17, 2004
17
0
151
Originally posted by awsol
Contact your provider and tell them to do the following

mkdir /home/USERNAME/logs

pico httpd.conf

hit control + W and then type the username to search within the apache config

Change

CustomLog domlogs/DOMAIN.com combined
to
CustomLog /home/USERNAME/logs/DOMAIN.com combined

Hit control + O then Enter

Now just to be safe have them do this

chown USERNAME.USERNAME /home/USERNAME/logs/domain.com


Then tell them to restart apache just to make sure it all works right. That way it don't crash while they're AFK. Rather have it crash while they're there.


Now all you have to do is login via FTP and change directories to logs and download the file. This will be in realtime so you can use webtrends or your favorite traffic generator.

Also tell them to replace USERNAME with your correct username. And domain.com with your domain.

I do this for a bunch of my clients. You will be happy with how it works.

Good luck and may business bring you great pleasure.
Hi there,

Hope you don't mind me bumping an OLD post but I have a question regarding what you wrote, specifically the chown... part.

IS there a way to automatically chown the /logs/filename without having to manually do it everytime you setup a new account?

Can it be incorporated into the CustomLog/virtual area?

Any idea/help?

Thanks!!!

Aaron
 

andyf

Well-Known Member
Jan 7, 2002
249
0
316
UK
I believe there's a option in cpanel to archive the months into your home directory at the EOM, if this helps.