Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
apache logs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
col
l33t
l33t


Joined: 08 May 2002
Posts: 820
Location: Melbourne - Australia

PostPosted: Tue Dec 17, 2002 11:13 pm    Post subject: apache logs Reply with quote

My apache logs are not rotating. The default directory for the logs is /var/log/apache but none of them rotate. What is the best way to rotate them monthly? I have syslogd installed...can this be used ? Most of my logs in /var/log rotate already.
Back to top
View user's profile Send private message
fuji
Tux's lil' helper
Tux's lil' helper


Joined: 26 Apr 2002
Posts: 111

PostPosted: Tue Dec 17, 2002 11:38 pm    Post subject: Reply with quote

emerge logrotate

This little program does a pretty good job of it....

Just set it up to run in a daily cron job as root... and it'll take care of all. I use it for my mysql logs as well... since they can get pretty large....

man logrotate # for more information...

hope this helps :)
_________________
Came for the hype, stayed for Portage.
Back to top
View user's profile Send private message
col
l33t
l33t


Joined: 08 May 2002
Posts: 820
Location: Melbourne - Australia

PostPosted: Tue Dec 17, 2002 11:54 pm    Post subject: Reply with quote

can syslog rotate them ? .... as I said my logs in /var/log are already rotating, just not the apache logs ?
Back to top
View user's profile Send private message
seaweed
n00b
n00b


Joined: 22 Apr 2002
Posts: 53
Location: NJ, USA

PostPosted: Mon Mar 31, 2003 3:28 am    Post subject: syslog cannot rotate logs. Reply with quote

Quote:
can syslog rotate them ? .... as I said my logs in /var/log are already rotating, just not the apache logs ?


No, syslog is for writing logs.

Since you said that your other logs are rotating I assume you have logrotate.
You just need to add the apache logs to the logrotate config file.
Back to top
View user's profile Send private message
crown
n00b
n00b


Joined: 15 Jun 2002
Posts: 64

PostPosted: Mon Mar 31, 2003 3:48 am    Post subject: Reply with quote

He is probably using metalog which is the syslogger suggested by the gentoo install docs. It will rotate logs by default however apache does not use the syslogger. It uses it's own logging mechanism however you can use other tools such as logrotate to rotate them.

Personally I use "cronolog". It's masked by default but you can emerge it by doing

Code:
ACCEPT_KEYWORDS="~x86" emerge cronolog

Then check the docs at http://www.cronolog.org/usage.html for setting it up with apache.
Back to top
View user's profile Send private message
MasterC
Apprentice
Apprentice


Joined: 25 May 2003
Posts: 150
Location: Woods Cross, UT

PostPosted: Sun Jun 29, 2003 11:51 pm    Post subject: Reply with quote

I'd just like to say thank you! I've had great luck from simply searching the forums here! I was searching for info on why my logs are rotating without having logrotate installed. Metalog is a very nice logger I must say.

:)

Cool
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
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
You cannot vote in polls in this forum