Keeping raw log files for clients

avara

Well-Known Member
Oct 28, 2001
90
0
306
Hi,

I just got a request from a client for his old raw log files. Now unfortunately as per my understanding the log files are deleted by CPanel, but I'm sure this can be changed so that they are not deleted and saved into the users home directory instead for example?

&Hello, do you still have the raw access logs from May?
I went to download the raw log but it only has
the hits from today (June), and I was wondering if
I could get a copy of the May access log
for example.net from somewhere
(if it still exists).

No hurry, I just wanted to get some more information
about who visited what pages than Analog or
Webalizer provide...

thanks&
 

feanor

Well-Known Member
Aug 13, 2001
836
0
316
Right.....

The only way to bring this issue completely out of cpanel's influence is to designate a unique raw apache log for the domain in question. you'll see in your httpd.conf (/etc/httpd/conf/httpd.conf), that each domain setup by cpanel already has a domlogs logging to /usr/local/apache/domlogs........

Setup another line for a custom log, but start the log within the customer's directory-

like
CustomLog /home/username/username_access_log combined

Then, restart apache and chown the log to the customer's uid/gid....
you'll want to make sure you have a cron to clean this out and reset permissions accordingly, so that user can see the data when in FTP or in their CPanel, etc.


;)