Habe folgendes Test-CGI in Python erstellt, aber es läuft unter Apache nicht:
- Code: Select all
#!/usr/bin/python2.4
print "Content-type: text/html"
print
print "<html>"
print "<body>"
print "<h1>CGI Test</h1>"
print "</body>"
print "</html>"
Es kommt folgende Fehlermeldung:
- Code: Select all
Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
localhost
Tue Mar 21 08:51:22 2006
Apache/2.0.54 (Linux/SUSE)
Das CGI ist in dem Verzeichnis '/srv/www/cgi-bin' und hat den Status 'ausführbar'.
Leider sind keine CGI-Beispiele von Haus aus beim Apache dabei, um zu sehen, ob CGI überhaupt richtig konfiguriert ist.
In meiner 'default-server.conf' steht:
- Code: Select all
ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"
# "/srv/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/srv/www/cgi-bin">
AllowOverride None
Options +ExecCGI -Includes
Order allow,deny
Allow from all
</Directory>
Gruss, Seven