LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 11-10-2005, 06:04 PM   #1
Jukas
Member
 
Registered: Mar 2005
Posts: 141

Rep: Reputation: 15
Quick logrotate question


I'm running Apache 1.33 on my Debian box and hosting a couple domains on it. In the httpd.conf I setup logging for the domains to go to their own subdirectory i.e.

/var/log/apache/domain.com
/var/log/apache/mail.domain.com

the default access and error logs are written to the root /var/log/apache/ directory and the access and error logs for the domains are in their own direcotry. I recently noticed that logrotate was rotating and compressing the logs in the /apache/ direcotyr but not the sub directories.

I found the apache file under /etc/logrotate.d/apache . What I'm wondering is if I changed the file to look like

Code:
/var/log/apache/*/*.log {
        weekly
        missingok
        rotate 52
        compress
        delaycompress
        notifempty
        create 640 root adm
        sharedscripts
        postrotate
           if [ -f /var/run/apache.pid ]; then \
             if [ -x /usr/sbin/invoke-rc.d ]; then \
                invoke-rc.d apache reload > /dev/null; \
             else \
                /etc/init.d/apache reload > /dev/null; \
             fi; \
           fi;
        endscript
}
Would that sucessfully rotate any .log file in the apache and sub directories?
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
a question about logrotate? hueofwind Linux - Newbie 3 11-08-2005 08:08 PM
Question Concerning ISO's and one quick question. evrae Linux - Software 2 06-21-2004 03:53 AM
samba smb.config question (quick question) TheDOGG Linux - Networking 1 03-02-2004 07:19 AM
logrotate question glock19 Linux - Networking 1 05-12-2003 09:08 PM
A question on logrotate marcoc Linux - Networking 2 02-21-2003 05:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 08:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration