Won't allow TransferLog or CustomLog in VH

Won't allow TransferLog or CustomLog in VH

Post by Boritt » Tue, 10 Apr 2001 02:41:28



Hello,

I've searched hi and low for an answer to this problem with no luck.  Maybe
someone here can help.

I have Red Hat 6.2 running Apache with name based vitual hosts.  I'm trying
to set up different access logs for each domain either using the TransferLog
or CustomLog directive.  My problem is when I place either of these
directives within the virtual host info, when Apache tries to start up I get
"Invalid command 'TransferLog', perhaps mis-spelled or defined by a module
not included in the server configuration."  The ErrorLog directive works
within the virtual host info and CustomLog works in the default server.

I'm at a total loss.  Can somebody please help me.

Thank you,
Chris

 
 
 

Won't allow TransferLog or CustomLog in VH

Post by Michael Buen » Wed, 11 Apr 2001 02:10:51


think you've got to re-compile apache with this module
(but not positive).

> Hello,

> I've searched hi and low for an answer to this problem with no luck.  Maybe
> someone here can help.

> I have Red Hat 6.2 running Apache with name based vitual hosts.  I'm trying
> to set up different access logs for each domain either using the TransferLog
> or CustomLog directive.  My problem is when I place either of these
> directives within the virtual host info, when Apache tries to start up I get
> "Invalid command 'TransferLog', perhaps mis-spelled or defined by a module
> not included in the server configuration."  The ErrorLog directive works
> within the virtual host info and CustomLog works in the default server.

> I'm at a total loss.  Can somebody please help me.

> Thank you,
> Chris


 
 
 

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. PGP for Linux

3. SetEnvIf and CustomLog won't cooperate

4. how-to traverse a list?

5. What's 'side effects' of Ksh built-ins?

6. How to control interactive messages on Linux?

7. Apache fatally exits when virtual domain's TransferLog can't be opened !

8. Dselect under Debian linux. Help please!

9. Hosts.allow file problems, won't accept domains

10. 5.6: NIS+: rpc.nisd -S0 won't allow nistbladm

11. Why won't Apache allow HEAD inside <Limit>?

12. Problem: Popper won't allow access from different domain.

13. xdm won't allow me to rlogin