Hallo,
eventuel ist ein User hier gewillt mir zu helfen und kann dieses Problem beheben
frische Installation:
apache2 mariadb-server mariadb-client php5 php5-mysql libapache2-mod-php5 libapache2-mod-perl2 phpmyadmin
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | root@TIKAL:/etc/apache2# cat sites-available/000-default.conf <VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any further virtual host explicitly. #ServerName www.example.com ServerAdmin webmaster@localhost DocumentRoot /var/www/html ServerName tikal.fritz.box # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. #LogLevel info ssl:warn ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> #ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ #<Directory "/usr/lib/cgi-bin"> #Options All #AllowOverride All #Require all granted #</Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to # include a line for only one particular virtual host. For example the # following line enables the CGI configuration for this host only # after it has been globally disabled with "a2disconf". #Include conf-available/serve-cgi-bin.conf </VirtualHost> # vim: syntax=apache ts=4 sw=4 sts=4 sr noet |
Wie hier zu sehen ist, habe ich schon an den Einstellungen geschraubt, allerdings jedes Mal ohne Erfolg.
1 2 3 4 | root@TIKAL:/etc/apache2# cat /usr/lib/cgi-bin/test.pl #!/usr/bin/perl print "Content-type: text/html\n\n"; print "Hallo Welt!\n"; |
Die Berechtigungen sind
1 2 | root@TIKAL:/etc/apache2# ls -l /usr/lib/cgi-bin/test.pl -rw-r--r-- 1 root root 78 Jul 26 11:45 /usr/lib/cgi-bin/test.pl |
Ich denke aber nicht, dass es an den Berechtigungen liegt. Denn ich habe im gleichen Ordner - um den Alias zu testen - ein PHP-Skript angelegt, welches die gleichen Rechte besitzt und wunderbar funktioniert:
1 2 3 4 5 6 | root@TIKAL:/etc/apache2# ls -l /usr/lib/cgi-bin/testephp.php -rw-r--r-- 1 root root 20 Jul 26 11:47 /usr/lib/cgi-bin/testephp.php root@TIKAL:/etc/apache2# cat /usr/lib/cgi-bin/testephp.php <?php phpinfo(); ?> |
Wenn ich nun im Webbrowser meiner Wahl tikal.fritz.box/cgi-bin/testephp.php eingebe sehe ich die PHP-Testseite. Ein wget-Aufruf lädt die HTML-Daten runter. Alles gut also. Gehe ich aber auf tikal.fritz.box/cgi-bin/test.pl, bietet er mir die test.pl zum Download an, anstatt sie auszuführen. Würde mich sehr freuen wenn mir jemand helfen mag oder sagen kann wo mein Problem liegt - ich bin leider gerade Blind. ☹
Vielen Dank!