Disclosure: I searched a lot, and I don\'t think my question (for my configuration) is answered here. For example run python script as cgi apache server doesn\'t answer it.
try this
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
cgi script
import cgi
import cgitb; cgitb.enable()
print "Content-type: text/html\n\n"
print "Hello from Python!
"
Why don't you configure like this? here.
ScriptAlias /cgi-bin/ /var/www/my_cgi_dir/
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all