How does rotatelog work?

How does rotatelog work?

Post by Gregorio Montanar » Tue, 24 Dec 1996 04:00:00



Sorry for the silly question but i can not manage to work this piece of
software, is anybody using it successfully?

Tank you.

Gregorio

---------------------------------------------------------

Gregorio Montanari
Laboratorio di Storia quantitativa
Universita' di Genova
tel. 39-10-209-9841

 
 
 

1. rotatelog command and CustomLog / TransferLog

I am trying to understand how to use the Apache rotatelog command, and
reading any documentation or newsgroup postings has not completely
answered my questions, so here goes...

Server 1:
Apache running on Sun Solaris server, v2.8
Current httpd.conf information:

LogFormat "%h %l %u %t \"%r\" %>s %b" common
#
# The location and format of the access logfile (Common Logfile Format).

# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here.  Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
CustomLog /www/a/apache/logs/access_log common

##
## SSL Virtual Host Context
##

<VirtualHost _default_:8443>

#  General setup for the virtual host
DocumentRoot "/www/a/apache/htdocs"
#ServerName abc.xyz.com

ErrorLog /www/a/apache/logs/error_log
TransferLog /www/a/apache/logs/access_log

... So, if I understand this correctly, in this case since there is a
Virtual Host defined, the CustomLog directive is basically ignored and
all logging is put into the file defined by TransferLog (which, in this
case, is the same file ...).  I should be able to modify the TransferLog
statement to read:
TransferLog "|/www/a/apache/bin/rotatelogs
/www/a/apache/logs/access_log 604800"
and the result will be daily access_logs ....

Comments? Am I understanding the information they have in the file?

Server 2:
Apache running on Sun Solaris server, v2.8
Current httpd.conf information:

# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b" common

#
#SetEnvIf directive included to stop pings from being logged - 011303
SetEnvIf Request_URI "HEAD / HTTP/1.0" nolog

#
# The location and format of the access logfile (Common Logfile Format).

# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here.  Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
# CustomLog logs/access_log common 011303: Replaced with nolog line
CustomLog logs/access_log common env=!nolog

... there is NO Virtual Host or TransferLog defined .....

In this case, how would I use the rotatelogs utility?

I do not think CustomLog "|/www/Artesia/apache/bin/rotatelogs
/www/Artesia/apache/logs/access_logs 604800" env=!nolog  will
work......

Suggestions / comments?

Thanks,
Jon

2. Linux Firewall HOWTO (part 1/1)

3. How to make pcmcia ethernet card that works with Linux work with dos? . .

4. CPU Load

5. HELP: Connectivity between DOS/DOS and DOS/Linux

6. filename and pipes and *

7. ipchains : ftp does not work from dos prompt

8. How to 4.4 RELEASE -> 4.5

9. Working from or using DOS drivers under Linux

10. Anyone doing any mc68hc11 work with Linux ?

11. forwarding ippp-eth0 dos not work

12. serial ports work with DOS but don't probe with FreeBSD 2.2.2

13. ** DONE ! (it worked!) **