Hallo,
bin auf deine Anfrage gestossen.
Falls irgendwer mal wieder diesen thread aufrufen sollte, so hab ich hier die Lösung.
Folgendes kommt in die httpd.conf
- Code: Select all
//cgi benutzen
LoadModule cgi_module modules/mod_cgi.so
//ähnlich wie index.html wird index.py automatisch aufgerufen
<IfModule dir_module>
DirectoryIndex index.php index.php4 index.php3 index.cgi index.pl
index.html index.htm index.shtml index.phtml
index.py
</IfModule>
//*.py statt *.cgi im Browser aufrufen
<IfModule mime_module>
AddHandler cgi-script .py
</IfModule>
In deine Python-Datei sollte dann noch das cgi import werden.
- Code: Select all
#!/usr/bin/python
import cgitb; cgitb.enable()
import cgi
print "Hallo Welt"