From owner-freebsd-questions Sat Feb 23 7:38:48 2002 Delivered-To: freebsd-questions@freebsd.org Received: from db.nexgen.com (db.nexgen.com [66.92.98.149]) by hub.freebsd.org (Postfix) with SMTP id 0B7FA37B404 for ; Sat, 23 Feb 2002 07:38:45 -0800 (PST) Received: (qmail 91326 invoked from network); 23 Feb 2002 15:39:49 -0000 Received: from localhost.nexgen.com (HELO noc) (root@127.0.0.1) by localhost.nexgen.com with SMTP; 23 Feb 2002 15:39:49 -0000 Message-ID: <001801c1bc80$0c7bf2d0$faa0b542@noc> From: "alexus" To: "Florian Nigsch" , References: <003701c1bc7b$0e9fd680$faa0b542@noc> <20020223161238.A12878@nigsch.com> Subject: Re: logs (rotation) Date: Sat, 23 Feb 2002 10:37:48 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ----- Original Message ----- From: "Florian Nigsch" To: "alexus" ; Sent: Saturday, February 23, 2002 10:12 AM Subject: Re: logs (rotation) > On Sat, Feb 23, 2002 at 10:02:05AM -0500, alexus wrote: > > 1. when I use TransferLog inside my apache's configuration I get common type > > of log, how can I switch it to combined? > > make sure you have a line reading > > LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined > > in your httpd.conf file > > and for the logging add a line > > CustomLog /var/log/httpd-access.log combined > > for each vhost you want to log separately i did that and it works fine, however when i run rotatelogs from apache's dir i get this instructions %/usr/local/apache/bin/rotatelogs Usage: /usr/local/apache/bin/rotatelogs [offset minutes from UTC] Add this: TransferLog "|/usr/local/apache/bin/rotatelogs /some/where 86400" to httpd.conf. The generated name will be /some/where.nnnn where nnnn is the system time at which the log nominally starts (N.B. this time will always be a multiple of the rotation time, so you can synchronize cron scripts with it). At the end of each rotation time a new log is started. % so they suggest to use TransferLog instead of CustomLog this is also an answer for my question 4 > > > 2. how can I rotate error_log? > > by adding the files you want to rotate to newsyslog.conf or by creating > a script yourself and running it on a periodic basis out of cron. > > > 3. can I limit amount of logs? > > newsyslog provides this capability, you could add it to your script. > > > 4. those numbers.. what do they mean? is there any sequence in them? > > transfer_log.1014249600 transfer_log.1014336000 transfer_log.1014422400 > > No idea on this. Is there something already rotating your logs? > > flo > all those questions meant to do all rotating and other stuff withing apache. > > -- > > > --- > Florian Nigsch > http://flo.nigsch.com/ > PGP key: http://flo.nigsch.com/fnigsch.asc > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message