silvernetuk

Well-Known Member
Sep 2, 2002
311
0
166
United Kingdom
Hi,

Is it possible to get the domlogs for each user to /home/username/logs/ in there own accont as I have had to chmod the domlogs folder to 711 which is hiding all the logs.

So how would I got about moving the logs from domlogs to /home/username/logs ?

Regards,
Garry
 

dgbaker

Well-Known Member
PartnerNOC
Sep 20, 2002
2,576
9
343
Toronto, Ontario Canada
cPanel Access Level
DataCenter Provider
you could do this.

You would have to copy each log to their area and then make a symbolic link to the file in the domlogs folder. IE:

cd /home/user/logs
mv /usr/local/apache/domlogs/userdomainlog .
cd /usr/local/apache/domlogs
ln -s /home/user/logs/userdomainlog userdomainlog

I'm not sure though if the stats programs will respect this or not though.
 

silvernetuk

Well-Known Member
Sep 2, 2002
311
0
166
United Kingdom
Hi,

Thank you for your reply :)

I don't want to mess up the web stats, but I am starting to think dedicated ip addresses for each client, as I read somewhere if they have dedicated ip address they only get access to this only logs.

Unless my other this works http://216.118.116.105/read.php?TID=6142

Regards,
Garry
 

Tom Pyles

Well-Known Member
Apr 26, 2002
254
0
316
We have moved our logs over to a different partition because of their size and the stats programs read them just fine/

Sometimes your logs are just too big and fill up too fast for the current partition they are on. A simple solution to this is to move them to a different partition. For example, let’s say your /usr partition is over %90 and every time you delete your logs, within a few hours it is back at %90 again. The solution is simple and we will discuss how to do this.

First thing you need to do is to move your logs. We recommend you shut down the service that uses this log along with the chkservd daemon which checks your services. In this example you would want to shutdown chkservd followed by Apache:

/etc/rc.d/init.d/chkservd stop

/etc/rc.d/init.d/httpd stop

Then you would move the two directories to a different partition. Most people use their /home partition, but if you have a backup drive in your server you may want to use it. I prefer to use my backup drive (for logs, since I don't consider my logs to be critical data) as this takes some of the work off the main drive, so I would create a directory on my backup drive:

mkdir /backup/usr/

Then I would move the directories over:

mv /usr/local/apache/domlogs /backup/usr/

mv /usr/local/apache/logs /backup/usr/

That will move the two major log directories from your /usr partition to your /backup partition. The last thing you need to do is create the symbolic links in the ‘old’ locations so that Apache can find where you have moved these logs.

cd /usr/local/apache/

ln –s /backup/usr/domlogs/ domlogs

ln –s /backup/usr/logs/ logs

This will create the links in the ‘old’ location to point to the ‘new’ location. The last thing to do is restart Apache and chkservd:

/etc/rc.d/init.d/httpd start

/etc/rc.d/init.d/chkservd start

And that’s it! Your logs are now stored on your backup partition and will never hassle your /usr partition again.

Please note that if you are using a back-up that unmounts, you will need to find another partition to move the logs to.