Date: Sat, 23 Feb 2002 10:37:48 -0500 From: "alexus" <ml@db.nexgen.com> To: "Florian Nigsch" <flo@nigsch.com>, <freebsd-questions@freebsd.org> Subject: Re: logs (rotation) Message-ID: <001801c1bc80$0c7bf2d0$faa0b542@noc> References: <003701c1bc7b$0e9fd680$faa0b542@noc> <20020223161238.A12878@nigsch.com>
next in thread | previous in thread | raw e-mail | index | archive | help
----- Original Message ----- From: "Florian Nigsch" <flo@nigsch.com> To: "alexus" <ml@db.nexgen.com>; <freebsd-questions@freebsd.org> 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 <logfile> <rotation time in seconds> [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 <flo@nigsch.com> > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001801c1bc80$0c7bf2d0$faa0b542>