Asko
Asko

Reputation: 132

mod_wsgi doesn't work with WAMP

I have installed Python 2.7 and mod_wsgi. I've added

LoadModule wsgi_module modules/mod_wsgi.so

to the http.conf file for Apache (I'm using WAMP 2.2a) and Windows 7 Ultimate 64 bit. In my www folder I have a file test.py with the following code:

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]

It will print it out as-is, like it would be an ordinary text file. Googling unfortunately did not get me any further, any idea what could be the problem or what am I leaving out?

Upvotes: 1

Views: 1262

Answers (2)

Ashley Davis
Ashley Davis

Reputation: 10040

Are you using the 64 bit version of WAMP?

If so you need to make sure you are using the 64 bit version of mod_wsgi.

You can find it here: http://www.lfd.uci.edu/~gohlke/pythonlibs/

Upvotes: 0

Mark
Mark

Reputation: 108512

Sounds like you haven't told apache to mount that application for processing with wsgi. Have you followed all of these instructions.

Upvotes: 2

Related Questions