Loading ...
Sorry, an error occurred while loading the content.

Re: VLOG and Apache 2.0 and Mandrake

Expand Messages
  • edival76
    Found it. I have to explicitly set the directory for the logs so: SetEnv VLOG /var/log/httpd/ easy! :) This appears to be new for Apache 2.0
    Message 1 of 2 , Jun 15, 2003
    View Source
    • 0 Attachment
      Found it. I have to explicitly set the directory for the logs so:

      SetEnv VLOG /var/log/httpd/

      easy! :)

      This appears to be new for Apache 2.0

      --- In webalizer@yahoogroups.com, "edival76" <edival@t...> wrote:
      > Has anyone got VLOG's working on Apache 2.0 with Mandrake?
      >
      > My Vhosts.conf file has
      >
      > SetEnv VLOG
      >
      > my httpd.conf has
      > Include conf/vhosts/Vhosts.conf
      > CustomLog "|/usr/sbin/advxsplitlogfile" vhost env=VLOG
      >
      > This is the right method right?
      >
      > the advxsplitlogfile will split the file based on the VLOGs
      > apparently.
      >
      > #!/usr/bin/perl
      > local $_;
      > while (<STDIN>) {
      > my ($vhost) = split /\s/;
      > s/VLOG=(.*)[\/]*$//;
      > my $logs = $1;
      > $logs = "/var/log/httpd" if $logs eq "";
      > my $date = `date +%Y-%m`;
      > chop $date;
      > my $filename = "$logs/VLOG-$date-${vhost}.log";
      > if (-l $filename) {
      > die "File $filename is a symlink, writing too dangerous,
      > dying!\n";
      > }
      > local *LOGFILE;
      > open LOGFILE, ">>$filename"
      > or die("Can't open $logs/$filename");
      > s/^\S*\s+//;
      > print LOGFILE $_;
      > close(LOGFILE);
      > }
      >
      > exit(0);
    Your message has been successfully submitted and would be delivered to recipients shortly.