You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jochen Kächelin <jk...@linux.amsjk.de> on 2002/12/05 23:10:30 UTC
[users@httpd] logfiles do not rotate
My httpd 2.0.43 will not rotate logs!
/usr/local/apache2/logs looks linke:
-rw-r--r-- 1 root root 3072 Dez 5 23:04 access_log.1039046400
-rw-r--r-- 1 root root 1464 Dez 5 23:04 agent_log.1039046400
-rw-r--r-- 1 root root 1464 Dez 5 23:04 error_log.1039046400
-rw-r--r-- 1 root root 6 Dez 5 23:02 httpd.pid
-rw-r--r-- 1 root root 1464 Dez 5 23:04 referer_log.1039046400
my /etc/logrotate.d/httpd looks like:
/usr/local/apache2/logs/*_log.* {
missingok
notifempty
sharedscripts
postrotate
/usr/bin/killall -HUP httpd
endscript
}
and I start httpd 2.0.43 with the following lines
in /etc/apache/httpd.conf
CustomLog "|/usr/local/apache2/bin/rotatelogs /usr/local/apache2/logs/access_log 86400" combined
CustomLog "|/usr/local/apache2/bin/rotatelogs /usr/local/apache2/logs/error_log 86400" combined
CustomLog "|/usr/local/apache2/bin/rotatelogs /usr/local/apache2/logs/agent_log 86400" combined
CustomLog "|/usr/local/apache2/bin/rotatelogs /usr/local/apache2/logs/referer_log 86400" combined
my /etc/logrotate.conf looks like:
daily
rotate 4
create
compress
include /etc/logrotate.d
/var/log/wtmp {
monthly
create 0664 root utmp
rotate 1
}
I will get the logfiles in such a format:
access_log.10122002.tgz
error_log.10122002.tgz
Is this possible?
--
Jochen Kaechelin
---------------------------------------------------------------------
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
Re: [users@httpd] logfiles do not rotate
Posted by Gary Turner <kk...@sbcglobal.net>.
Jochen Kächelin wrote:
>My httpd 2.0.43 will not rotate logs!
<snip>
>my /etc/logrotate.d/httpd looks like:
>
>/usr/local/apache2/logs/*_log.* {
> missingok
> notifempty
> sharedscripts
> postrotate
> /usr/bin/killall -HUP httpd
> endscript
>}
>
>and I start httpd 2.0.43 with the following lines
>in /etc/apache/httpd.conf
>
>CustomLog "|/usr/local/apache2/bin/rotatelogs /usr/local/apache2/logs/access_log 86400" combined
>CustomLog "|/usr/local/apache2/bin/rotatelogs /usr/local/apache2/logs/error_log 86400" combined
Not sure the error log is configurable (???). Plus, the error log is
specified elsewhere in the file.
>CustomLog "|/usr/local/apache2/bin/rotatelogs /usr/local/apache2/logs/agent_log 86400" combined
^^^^^^^^
>CustomLog "|/usr/local/apache2/bin/rotatelogs /usr/local/apache2/logs/referer_log 86400" combined
^^^^^^^^
Won't these just duplicate your access log? See your LogFormat lines.
Try 'agent' and 'referer' nicks respectively. These variables are
included in the 'combined' format, so you might prefer the 'common'
access format. These are default nicks/formats in my httpd.conf file
(Apache 1.3.x Debian pkg). See http://apache.org/docs/logs.html
<snip>
As I understand it, these are two separate programs, i.e. logrotate !=
rotatelogs. Are they in conflict? I would choose one or the other. I
use logrotate, myself. To get the output you want, then rotatelogs is
what you want.
I hope I got a couple of things right and that they help.
--
gt kk5st@sbcglobal.net
Everything here could be wrong--Messiah's Handbook
as quoted by Bach in "Illusions"
---------------------------------------------------------------------
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