hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Dedicated Server : Help with logrotate
Reply

Forum Jump

Help with logrotate

Reply Post New Thread In Dedicated Server Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old
Newbie
 
Join Date: Aug 2007
Posts: 10

Help with logrotate


Hi all,
i have a little issue with the domlogs folder.
I should empty this files but i don't know if it is possible to do without reboot Apache.
a) how can i setup logrotate to rotate domlogs?
And if it is possible:
b) how can i setup logrotate to rotate domlogs without restart apache?
I have already setup whm-> tweak settings to delete old domain's access logs after stats run and the whm is setup to generate statistics every 20 hours.
But every day the site is slowly because the domlogs are too big.
Can anyone help me?
Thank.



Sponsored Links
  #2  
Old
Your support partner
 
Join Date: Apr 2005
Location: Queen of Arabian Sea
Posts: 2,433
you could just use the command "> log_file_name" to empty the log file. no restart is required

__________________
Sam
Supportlobby.com - Specialist in Windows Server Management
Spiralbean.com - Custom Software Development

  #3  
Old
Newbie
 
Join Date: Aug 2007
Posts: 10
thank for the reply,
it is equivalent to command:touch. Right?
and the file is not deleted but empty and so no restart is required for Apache.
It is work fine
But what if i do not want every day login into ssh and i want to automatize the workout?
What is your method?

Sponsored Links
  #4  
Old
Your support partner
 
Join Date: Apr 2005
Location: Queen of Arabian Sea
Posts: 2,433
cron is your savior

__________________
Sam
Supportlobby.com - Specialist in Windows Server Management
Spiralbean.com - Custom Software Development

  #5  
Old
Newbie
 
Join Date: Aug 2007
Posts: 10
Thank for the reply.
I have tried to create a crontab but i don't know if i should insert the path to logrotate.conf or i should insert the path to logrotate.d.
What is the just step to have crontab working?

  #6  
Old
Web Hosting Guru
 
Join Date: May 2006
Location: /home/India/Kolkata
Posts: 306

  #7  
Old
Newbie
 
Join Date: Aug 2007
Posts: 10
Useful link.
i should just create a new file in logrotate.d and setup what i want to do and then create a cronjob.
Thank you.

Reply

Related posts from TheWhir.com
Title Type Date Posted


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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 Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
WHT Host Brief Email:

We respect your privacy. We will never sell, rent, or give away your address to any outside party, ever.

Advertisement:
Web Hosting News:
WHT Membership
WHT Membership



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?