mod_wsgi在WAMP中不起作用
我安装了Python 2.7和mod_wsgi。我在Apache的http.conf文件中添加了
LoadModule wsgi_module modules/mod_wsgi.so
(我使用的是WAMP 2.2a和Windows 7 Ultimate 64位)。在我的www文件夹里,有一个名为test.py的文件,里面有以下代码:
def application(environ, start_response):
status = '200 OK'
output = 'Hello World!'
response_headers = [('Content-type', 'text/plain'),
('Content-Length', str(len(output)))]
start_response(status, response_headers)
return [output]
这个文件会像普通文本文件一样直接输出内容。可惜我在网上搜索没有找到更好的解决办法,你知道可能是什么问题,或者我遗漏了什么吗?