VPSNext


Go Back   Your VPSNext Community > VPSNext Web Hosting > Dedicated Servers

Dedicated Servers Looking for a dedicated? Have you outgrown your VPS? Get the Ins and Outs of our dedicated servers in this forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-14-2009, 04:15 PM
kikinda kikinda is offline
Junior Member
 
Join Date: Mar 2009
Posts: 1
Default compress domlogs

How can I compress my CPanel access logs domains files?
Reply With Quote
  #2  
Old 03-14-2009, 04:26 PM
todott todott is offline
Member
 
Join Date: Feb 2009
Posts: 37
Default Re: compress domlogs

Before setting up compression of your logs you will want to have cpanel run the stats as often as possible. This is so you do not miss any stats that would have been included were your logs not compressed before stats run. To do this, login to WHM, and click on Tweak Settings under Server Configuration in the left menu. Scroll down to Stats and Logs, and then in the field next to "Number of days between processing log files and bandwidth usage (for example 5). After doing this, we can begin to setup your domlogs compression. You will need to open an ssh shell to your server to complete this. Change directories to /etc/logrotate.d/ and find the file named httpd. You will need to copy this file to a new file in the same directory:
Code:
cp httpd domlogs
Now you will want to edit your new file to contain the following:
Code:
/usr/local/apache/logs/*.com /usr/local/apache/logs/*.org /usr/local/apache/logs/*.net {
    missingok
    notifempty
    size=200M
    rotate 2
    compress
    sharedscripts
    postrotate
    /bin/kill -HUP `cat /usr/local/apache/logs/httpd.pid 2>/dev/null` 2> /dev/null || true
    endscript
}
Reply With Quote
  #3  
Old 03-15-2009, 12:29 PM
persi persi is offline
Senior Member
 
Join Date: Feb 2009
Posts: 105
Default Re: compress domlogs

By me is absolutely useless to do anything. When awstats processed the stats the log is automatically deleted.
Reply With Quote
Reply

Tags
compress, domlogs

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 11:12 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.

Copyright 2008 VPSNext. All rights reserved.