Results 1 to 7 of 7
  1. #1

    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.

  2. #2
    Join Date
    Apr 2005
    Location
    Queen of Arabian Sea
    Posts
    2,434
    you could just use the command "> log_file_name" to empty the log file. no restart is required
    Sam
    Supportlobby.com - Specialist in Windows/Linux Server Management
    Spiralbean.com - Custom Software Development
    Email: exec@supportlobby.com | Skype: exec_activelobby

  3. #3
    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?

  4. #4
    Join Date
    Apr 2005
    Location
    Queen of Arabian Sea
    Posts
    2,434
    cron is your savior
    Sam
    Supportlobby.com - Specialist in Windows/Linux Server Management
    Spiralbean.com - Custom Software Development
    Email: exec@supportlobby.com | Skype: exec_activelobby

  5. #5
    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. #6
    Join Date
    May 2006
    Location
    /home/India/Kolkata
    Posts
    306

  7. #7
    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.

  8. Newsletters

    Subscribe Now & Get The WHT Quick Start Guide!

Related Posts from theWHIR.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •