niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Apps » Apache
logrotate doesn't create *log.1
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
Author Message
thomas Armstrong
*nix forums beginner


Joined: 16 Sep 2005
Posts: 15

PostPosted: Thu Jul 20, 2006 8:37 am    Post subject: logrotate doesn't create *log.1 Reply with quote

Hi

Working with Apache 2.0.52 on Linux, I created this logrotate
configuration file:
-------
/usr/local/httpd/logs/*log {
missingok
notifempty
sharedscripts
postrotate
/bin/kill -USR1 `cat /usr/local/httpd/logs/httpd.pid
2>/dev/null` 2> /dev/null || true
endscript
}
------------------

I executed '/usr/sbin/logrotate -v /etc/logrotate.d/httpd' and I get
this kind of messages:
-------
renaming /usr/local/httpd/logs/access_log to /usr/local/httpd/logs/access_log.1
disposeName will be /usr/local/httpd/logs/access_log.1
removing old log /usr/local/httpd/logs/access_log.1
rotating log /usr/local/httpd/logs/blog_eitb-access_log, log->rotateCount is 0
--------

However, '/usr/local/httpd/logs/access_log.1' doesn't exist, and
'/usr/local/httpd/logs/access_log' is empty!

Must I 'chmod a+w' /usr/local/httpd/logs/ directory?

Thank you very much.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Back to top
Neil A. Hillard
*nix forums addict


Joined: 09 Mar 2005
Posts: 77

PostPosted: Thu Jul 20, 2006 8:53 am    Post subject: Re: logrotate doesn't create *log.1 Reply with quote

Hi,

thomas Armstrong wrote:
Quote:
Hi

Working with Apache 2.0.52 on Linux, I created this logrotate
configuration file:
-------
/usr/local/httpd/logs/*log {
missingok
notifempty
sharedscripts
postrotate
/bin/kill -USR1 `cat /usr/local/httpd/logs/httpd.pid
2>/dev/null` 2> /dev/null || true
endscript
}
------------------

I executed '/usr/sbin/logrotate -v /etc/logrotate.d/httpd' and I get
this kind of messages:
-------
renaming /usr/local/httpd/logs/access_log to
/usr/local/httpd/logs/access_log.1
disposeName will be /usr/local/httpd/logs/access_log.1
removing old log /usr/local/httpd/logs/access_log.1
^^^^^^^^


Quote:
rotating log /usr/local/httpd/logs/blog_eitb-access_log,
log->rotateCount is 0
^^^^^^^^^^^^^^^^


Quote:
However, '/usr/local/httpd/logs/access_log.1' doesn't exist, and
'/usr/local/httpd/logs/access_log' is empty!

Never having had a problem with this I'm only guessing but it looks like
you have logrotate set to 'rotate 0'. i.e. don't keep any logs! It
appears to be rotating and then removing the old log.

Check you logrotate config for how frequently it performs the rotation
and how many old versions it keeps.

HTH,


Neil.

--
Neil Hillard neil.hillard@agustawestland.com
Westland Helicopters Ltd. http://www.whl.co.uk/

Disclaimer: This message does not necessarily reflect the
views of Westland Helicopters Ltd.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
The time now is Thu Nov 20, 2008 9:43 pm | All times are GMT
navigation Forum index » Apps » Apache
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Create index hanging Claire McLister PostgreSQL 7 Thu Jul 20, 2006 8:11 pm
No new posts useradd and Yast can't create a user jim Suse 5 Mon Jul 17, 2006 11:21 pm
No new posts CREATE VIEW xxxx Karl Larsen MySQL 1 Mon Jul 17, 2006 12:26 pm
No new posts permission to create user Timothy Smith PostgreSQL 8 Mon Jul 17, 2006 6:56 am
No new posts Able to Create a Procedure in DB2 V8.1 But Unable to Run ... bashanitwonline@gmail.com IBM DB2 2 Fri Jul 14, 2006 5:13 am

Repair Bad Credit | Loans | Credit Cards | Mobile Phones | W810i
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.2020s ][ Queries: 16 (0.1221s) ][ GZIP on - Debug on ]