2011-11-27 40 views
1

我已经安装了Python 2.7和mod_wsgi。我已将mod_wsgi不适用于WAMP

LoadModule wsgi_module modules/mod_wsgi.so 

添加到Apache(我正在使用WAMP 2.2a)和Windows 7 Ultimate 64位的http.conf文件中。在我的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] 

将它打印出来,不被喜欢它会是一个普通的文本文件。不幸的是,谷歌搜索没有让我更进一步,任何想法可能是什么问题或我要离开?

回答

2

听起来像你还没有告诉Apache以挂载该应用程序进行处理与wsgi。你是否遵循了所有这些instructions

相关问题