【发布时间】:2014-12-20 23:41:30
【问题描述】:
我的windows-7 64 位计算机上有Abyss 网络服务器。我按照this official link 中的说明将python 支持添加到服务器,关于我没有下载文档中考虑的Active Python,我只是在我的机器上使用了以前安装的Python 3.3。
我写了非常简单的python脚本:
print("Hello")
然后我在服务器的htdocs中将它保存为test.py,然后我尝试访问http://localhost:9090/test.py但服务器返回错误500内部服务器错误记录此错误的日志行是:
cgi.log:
[21/Dec/2014:01:33:54 +0200] CGI: [C:\Python33\python.exe test.py ] URI: /test.py Bad CGI header line [Hello]
access.log:
127.0.0.1 - - [21/Dec/2014:01:33:54 +0200] "GET /test.py HTTP/1.1" 500 412 "" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML,如 Gecko)Chrome/39.0.2171.95 Safari/537.36"
那么我该如何修复 CGI 标题行呢?
【问题讨论】:
-
这可能会有所帮助,How to use Python in the web
-
@Himal 非常感谢
标签: windows-7 python python python-3.x abyss