简体   繁体   English

500内部服务器错误-python cgi

[英]500 Internal Server Error - python cgi

im new with Python CGI Programming and i start with getting errors :( 我是Python CGI编程的新手,我开始遇到错误:(

so i start a simple 'hello world' script but i got 500 Internal Server Error 所以我启动了一个简单的“ hello world”脚本,但出现500 Internal Server Error

the index.py file: index.py文件:

#!/usr/bin/python
#!/Python27/python
import cgi
import cgitb; cgitb.enable()
print "Content-Type: text/html\n\n"

print "hello world"  

.htaccess file: .htaccess文件:

Options Indexes FollowSymLinks
Add ExecCGI
Options Indexes FollowSymLinks ExecCGI
AddHandler cgi-script .py .cgi
DirectoryIndex index.py

i tried with chmod but same problem :( help me please 我尝试使用chmod但有同样的问题:(请帮帮我

Options Indexes FollowSymLinks would override Options ExecCGI . Options Indexes FollowSymLinks将覆盖Options ExecCGI To resolve this use Options +ExecCGI and also add SetHandler cgi-script 要解决此问题,请使用Options +ExecCGI并添加SetHandler cgi-script

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM