Brabax
0
Hallo zusammen,
ich habe einen HE root-server mit Plesk 10 auf ubuntu linux mit dem ich ein Problem habe.
Auf diesem Server habe ich eine Domain, auf der ich gerne mit Perl arbeiten würde.
Ich habe Perl auf dem Server installiert, das entsprechende Apache2-Paket installiert und aktiviert (also in /etc/apache2/mods-enabled verlinkt).
Nun möchte ich gerne in /var/www/vhosts/DOMAIN/cgi-bin/test/test.cgi bzw. test.pl ausführen.
Um dies zu erreichen habe ich weiterhin in Plesk den Perl-Support für diese Seite aktiviert (Websites & Domans => Website Scripting and Security => Check "CGI-Support" => the root directory of webspace).
Das Verzeichnis hat folgende Berechtigungen:
Wenn ich nun diese Dateien über den Browser aufrufe (also http://DOMAIN/cgi-bin/test/test.cgi respektive http://DOMAIN/cgi-bin/test/test.pl) bekomme ich von der CGI den Quellcode angezeigt und die PL zum Download angeboten.
Bei den beiden Dateien handelt es sich um die PLESK-CGI-Test-Dateien.
Nach ein wenig googlen habe ich dann ebenfalls versucht die Direktiven
Im Ordner /var/www/vhosts/DOMAIN/conf/... .conf einzutragen.
Dort habe ich allerdings folgende Dateien:
Da Plesk es nicht von alleine hinbekommt und ich mit Plesks "Struktur" der Config-Files nicht wirklich zu einer Einigung finde, komme ich an diesem Punkt nicht weiter.
Kann mir dort jemand helfen?
Hier noch der Quelltext der CGI/Perl-Datei:
ich habe einen HE root-server mit Plesk 10 auf ubuntu linux mit dem ich ein Problem habe.
Auf diesem Server habe ich eine Domain, auf der ich gerne mit Perl arbeiten würde.
Ich habe Perl auf dem Server installiert, das entsprechende Apache2-Paket installiert und aktiviert (also in /etc/apache2/mods-enabled verlinkt).
Code:
ii libapache2-mod-perl2 2.0.4-6ubuntu1 Integration of perl with the Apache2 web ser
ii libapache2-reload-perl 0.10-2 Reload Perl modules when changed on disk
ii libapparmor-perl 2.5.1-0ubuntu0.10.04.4 AppArmor library Perl bindings
ii libbsd-resource-perl 1.2903-2build1 BSD process resource limit and priority func
ii libclass-accessor-perl 0.34-1 Perl module that automatically generates acc
ii libcurses-perl 1.28-1 Curses interface for Perl
ii libcurses-ui-perl 0.9607-1 curses-based OO user interface framework for
ii libdbd-mysql-perl 4.012-1ubuntu1 A Perl5 database interface to the MySQL data
ii libdbi-perl 1.609-1build1 Perl Database Interface (DBI)
ii libdevel-symdump-perl 2.08-2 Perl module for inspecting perl's symbol tab
ii libdigest-hmac-perl 1.01-7 create standard message integrity checks
ii libdigest-sha1-perl 2.12-1build1 NIST SHA-1 message digest algorithm
ii liberror-perl 0.17-1 Perl module for error/exception handling in
ii libfile-copy-recursive-perl 0.38-1 Perl extension for recursively copying files
ii libfont-afm-perl 1.20-1 Font::AFM - Interface to Adobe Font Metrics
ii libhtml-format-perl 2.04-2 format HTML syntax trees into text, PostScri
ii libhtml-parser-perl 3.64-1 collection of modules that parse HTML text d
ii libhtml-tagset-perl 3.20-2 Data tables pertaining to HTML
ii libhtml-template-perl 2.9-1 HTML::Template : A module for using HTML Tem
ii libhtml-tree-perl 3.23-1 represent and create HTML syntax trees
ii libio-socket-inet6-perl 2.54-1.1 Object interface for AF_INET6 domain sockets
ii libio-string-perl 1.08-2 Emulate IO::File interface for in-core strin
ii liblocale-gettext-perl 1.05-6 Using libc functions for internationalizatio
ii libmail-sendmail-perl 0.79.16-1 Send email from a perl script
ii libmail-spf-perl 2.007-1 Perl implementation of Sender Policy Framewo
ii libmailtools-perl 2.05-1 Manipulate email in perl programs
ii libnet-daemon-perl 0.43-1 Perl module for building portable Perl daemo
ii libnet-dns-perl 0.65-1build1 Perform DNS queries from a Perl script
ii libnet-ip-perl 1.25-2 Perl extension for manipulating IPv4/IPv6 ad
ii libnet-xwhois-perl 0.90-3 Whois Client Interface for Perl5
ii libnetaddr-ip-perl 4.024+dfsg-1build1 IP address manipulation module
ii libparse-debianchangelog-perl 1.1.1-2ubuntu2 parse Debian changelogs and output them in o
ii libperl5.10 5.10.1-8ubuntu2.1 shared Perl library
ii libplrpc-perl 0.2020-2 Perl extensions for writing PlRPC servers an
ii libproc-processtable-perl 0.45-1 Perl library for accessing process table inf
ii librpc-xml-perl 0.72-1 Perl module implementation of XML-RPC
ii libsdl-perl 2.2.5-1 SDL bindings for the Perl language
ii libsocket6-perl 0.23-1 Perl extensions for IPv6
ii libsub-name-perl 0.04-1build1 Assigns a new name to referenced sub
ii libsys-hostname-long-perl 1.4-2 Figure out the long (fully-qualified) hostna
ii libterm-readkey-perl 2.30-4build1 A perl module for simple terminal control
ii libtext-charwidth-perl 0.04-6 get display widths of characters on the term
ii libtext-iconv-perl 1.7-2 converts between character sets in Perl
ii libtext-wrapi18n-perl 0.06-7 internationalized substitute of Text::Wrap
ii libtimedate-perl 1.1900-1 Time and date functions for Perl
ii liburi-perl 1.52-1 module to manipulate and access URI strings
ii libwww-perl 5.834-1ubuntu0.1 Perl HTTP/WWW client/server library
ii libxml-libxml-perl 1.70.ds-1 Perl interface to the libxml2 library
ii libxml-namespacesupport-perl 1.09-3 Perl module for supporting simple generic na
ii libxml-parser-perl 2.36-1.1build3 Perl module for parsing XML files
ii libxml-sax-expat-perl 0.40-1 Perl module for a SAX2 driver for Expat (XML
ii libxml-sax-perl 0.96+dfsg-2 Perl module for using and building Perl SAX2
ii perl 5.10.1-8ubuntu2.1 Larry Wall's Practical Extraction and Report
ii perl-base 5.10.1-8ubuntu2.1 minimal Perl system
ii perl-modules 5.10.1-8ubuntu2.1 Core Perl modules
Nun möchte ich gerne in /var/www/vhosts/DOMAIN/cgi-bin/test/test.cgi bzw. test.pl ausführen.
Um dies zu erreichen habe ich weiterhin in Plesk den Perl-Support für diese Seite aktiviert (Websites & Domans => Website Scripting and Security => Check "CGI-Support" => the root directory of webspace).
Das Verzeichnis hat folgende Berechtigungen:
Code:
/var/www/vhosts/DOMAIN/cgi-bin/test:
total 4.0K
-rwxr-xr-x 1 administrator psacln 662 2012-07-07 19:47 test.cgi
-rwxr-xr-x 1 administrator psacln 662 2012-07-07 19:47 test.pl
Wenn ich nun diese Dateien über den Browser aufrufe (also http://DOMAIN/cgi-bin/test/test.cgi respektive http://DOMAIN/cgi-bin/test/test.pl) bekomme ich von der CGI den Quellcode angezeigt und die PL zum Download angeboten.
Bei den beiden Dateien handelt es sich um die PLESK-CGI-Test-Dateien.
Nach ein wenig googlen habe ich dann ebenfalls versucht die Direktiven
Code:
<Directory /var/www/vhosts/DOMAIN/cgi-bin>
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
Options ExecCGI
</Directory>
Im Ordner /var/www/vhosts/DOMAIN/conf/... .conf einzutragen.
Dort habe ich allerdings folgende Dateien:
Code:
-rw-r----- 1 root www-data 14K 2013-06-15 21:21 13416832290.85406800_httpd.include
-rw-r----- 1 root www-data 15K 2012-07-07 20:20 13416852250.86808600_httpd.include
-rw-r----- 1 root www-data 15K 2012-07-07 20:49 13416869650.55796400_httpd.include
-rw-r----- 1 root www-data 16K 2012-07-07 20:49 13416869910.06310000_httpd.include
-rw-r----- 1 root www-data 8.8K 2012-07-08 01:19 13417031490.00979700_httpd_ip_default.include
-rw-r----- 1 root www-data 18K 2012-07-08 01:19 13417031710.62042600_httpd_ip_default.include
-rw-r----- 1 root www-data 18K 2012-07-08 02:44 13417082870.45994600_httpd_ip_default.include
-rw-r----- 1 root www-data 18K 2012-07-08 02:46 13417084060.77932200_httpd_ip_default.include
-rw-r----- 1 root www-data 368 2013-02-15 11:00 13609224380.60568000_httpd.include
-rw-r----- 1 root www-data 18K 2013-02-15 11:00 13609224380.60568000_httpd_ip_default.include
Da Plesk es nicht von alleine hinbekommt und ich mit Plesks "Struktur" der Config-Files nicht wirklich zu einer Einigung finde, komme ich an diesem Punkt nicht weiter.
Kann mir dort jemand helfen?
Hier noch der Quelltext der CGI/Perl-Datei:
Code:
#!/usr/bin/perl
print <<HTML;
Content-type: text/html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html">
<link rel="stylesheet" type="text/css" href="../../css/style.css">
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0">
<tr class="subhead" align="Left"><th>Name</th><th>Value</th></tr>
HTML
my $class;
foreach (sort keys %ENV) {
next unless /^HTTP_|^REQUEST_/;
$class = ($class ne 'normal')? 'normal': 'alt';
print <<HTML;
<tr class="$class"><td valign="top">$_</td><td>$ENV{$_}</td></tr>
HTML
}
print <<HTML;
</table>
</body>
</html>
HTML