想找一個最簡單的方式跑python的cgi,選擇了mod_python,這裡面的pythonhandler index沒搞的很懂,不過反正程序是可以跑起來了。centos6裡要用epel源才有mod_python
LoadModule python_module modules/mod_python.so
<Directory "/var/www/html/py">
AllowOverride FileInfo
AddHandler mod_python .py
# PythonHandler index
PythonDebug On
Order allow,deny
Allow from all
</Directory>