深渊web服务器和Python

2024-10-02 22:34:37 发布

您现在位置:Python中文网/ 问答频道 /正文

我的64位计算机上有Abyssweb服务器。我按照this official link中的说明向服务器添加支持,因为我没有下载文档中考虑的活动Python,我只是在我的机器上使用了以前安装的Python3.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, like Gecko) Chrome/39.0.2171.95 Safari/537.36"

那么我如何修复CGI标题行呢?在


Tags: 文档pytest服务器loghellowindows计算机