LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-04-2007, 12:38 AM   #1
dianarani
Member
 
Registered: May 2007
Posts: 63

Rep: Reputation: 15
Question setting logrotation for apache-1.3.35


Hello Everybody,
I would like to set log rotation by size for my apache which is APACHE1.3.35. Is there anybody to help me.Please expound me the details how could i check is it working correctly? actually i was confused with a lot of log files? Actually i got the command to set logrotation for 24 hours,


CustomLog "|/usr/local/apache/bin/rotatelogs /var/log/access_log 86400" common

but its not working.Help me .please.http://linuxquestions.cachefly.net/i...ies/newbie.gif

Last edited by dianarani; 06-04-2007 at 12:40 AM.
 
Old 06-04-2007, 03:27 AM   #2
digitalnerds
Member
 
Registered: May 2007
Distribution: Debian
Posts: 103

Rep: Reputation: 15
Hi there

You will need to use the /etc/logrotate.conf or /etc/logrotate.d/*.conf files to be similar to his

Code:
# see "man logrotate" for details 
 # rotate log files weekly 
 weekly

 # keep 4 weeks worth of backlogs 
 rotate 4

 # send errors to root 
 errors root

 # create new (empty) log files after rotating old ones 
 create

 # uncomment this if you want your log files compressed 
 #compress 

 # RPM packages drop log rotation information into this directory 
 include /etc/logrotate.d

 # no packages own lastlog or wtmp -- we'll rotate them here 
 /var/log/wtmp {
     monthly
     create 0664 root utmp
     rotate 1
 }

 /var/log/lastlog {
     monthly
     rotate 1
 }

 # system-specific logs may be configured here 
 ## rotate apache logs weekly, keeping 8 rotations
 /www/apache/var/logs/*log {
     rotate 8
     postrotate
       kill -HUP `cat /www/apache/var/logs/httpd.pid`
     endscript
 }
You can tweak this ocnf to suit your needs

Regards
Andy
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
edited logrotation cyberpunx Linux - Software 0 09-06-2005 01:55 PM
postgres+syslogng+logrotation problem emailssent Linux - General 8 04-11-2005 05:27 PM
logrotation doesn't working properly emailssent Linux - Networking 1 03-02-2005 10:54 AM
customizing Debian (deluser, logrotation, etc) markus1982 Linux - Distributions 0 05-25-2003 04:48 AM
logrotation cuss Linux - General 3 02-17-2003 01:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:42 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