Debian Apache - Mailgraph - CGI Datei

denisSCR

Mitglied
Hallo liebe Linux-Gemeinde,

ich habe folgendes Problem: Ich habe einen Apache2 Webserver auf Debian Lenny installiert, dieser läuft auch richtig. Dann habe ich auch Postfix installiert was auch richtig funktioniert. Jetzt will ich Mailgraph verwenden. Nach getaner Installation sollte beim Aufruf von http://mein-server/mailgraph/cgi-bin/mailgraph.cgi die Tabellen erscheinen. Allerdings sieht es so aus, als könnte Apache keine cgi-Dateien anzeigen können. Da er nur den Code anzeigt, ihn aber nicht ausführt.

Ausschnitt:
Code:
#!/usr/bin/perl -w

# mailgraph -- postfix mail traffic statistics
# copyright (c) 2000-2007 ETH Zurich
# copyright (c) 2000-2007 David Schweikert <david@schweikert.ch>
# released under the GNU General Public License

use RRDs;
use POSIX qw(uname);

my $VERSION = "1.14";

my $host = (POSIX::uname())[1];
my $scriptname = 'mailgraph.cgi';
my $xpoints = 540;
my $points_per_sample = 3;
my $ypoints = 160;
my $ypoints_err = 96;
my $rrd = '/var/lib/mailgraph/mailgraph.rrd'; # path to where the RRD database is
my $rrd_virus = '/var/lib/mailgraph/mailgraph_virus.rrd'; # path to where the Virus RRD database is
my $tmp_dir = '/var/lib/mailgraph'; # temporary directory where to store the images

my @graphs = (
   { title => 'Last Day',   seconds => 3600*24,        },
   { title => 'Last Week',  seconds => 3600*24*7,      },
   { title => 'Last Month', seconds => 3600*24*31,     },
   { title => 'Last Year',  seconds => 3600*24*365, },
);

my %color = (
   sent     => '000099', # rrggbb in hex
   received => '009900',
   rejected => 'AA0000',
   bounced  => '000000',
   virus    => 'DDBB00',
   spam     => '999999',
);

sub rrd_graph(@)
{
   my ($range, $file, $ypoints, @rrdargs) = @_;
   my $step = $range*$points_per_sample/$xpoints;
   # choose carefully the end otherwise rrd will maybe pick the wrong RRA:
   my $end  = time; $end -= $end % $step;
   my $date = localtime(time);
   $date =~ s|:|\\:|g unless $RRDs::VERSION < 1.199908;

usw....

Wie kann ich Apache beibringen die Datei anzuzeigen?
Vielen Dank im Vorraus!
 

Neue Beiträge

Zurück