Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Oct 20, 2011 11:06 am 
Offline
Junior Member

Joined: Sat Feb 21, 2009 6:25 pm
Posts: 26
I'm trying to set up logrotate now. I have some questions.

First, should I pipe the logfile through logrotate, like this (in sites-enabled)

CustomLog "|bin/rotatelogs /srv/www/realfreemarket.org/logs/access.log 86400

[I tried that and it didn't work.]

Or, should I explicitly call logrotate as a cron job?

Also, I'd like to keep my logs in the form access.YYYY.MM.DD.log, and keep them for at least a month or two. How do I do that?


Top
   
 Post subject:
PostPosted: Thu Oct 20, 2011 12:19 pm 
Offline
Junior Member

Joined: Sat Feb 21, 2009 6:25 pm
Posts: 26
It's silly to answer my own question, but I figured it out. I changed it to:

CustomLog "|/usr/sbin/rotatelogs -l /srv/www/realfreemarket.org/logs/access
.%Y.%m.%d.log 86400" combined

ubuntu puts "rotatelogs" in "/usr/sbin" instead of "/bin".


Top
   
 Post subject:
PostPosted: Wed Oct 26, 2011 5:31 am 
Offline

Joined: Wed Oct 26, 2011 5:28 am
Posts: 1
It is not so silly as it may seem, you answer helped me! Thanks!

_________________
android development


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group