im configuring my EC2 instance (amazon web services) on an ubuntu server, to test django(python)
I have python installed, and the apache server,
I have the It works! [apache] page on my url address, index.html
now im configuring the wsgi and mod_wsgi [for python and django],
im following this info to configure wsgi:
deploy python wsgi app tutorial
but when I try the Basic Hello World WSGI Configuration
import os
import sys
sys.path.append('/srv/www/cucus/application')
os.environ['PYTHON_EGG_CACHE'] = '/srv/www/cucus/.python-egg'
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]
and go to mysite/application/application.wsgi
http://ec2-107-20-20-19.compute-1.amazonaws.com/cucus/application/application.wsgi
in my browser,
i see the code for the page, but not the rendered “hello world”
what im i missing?
do I need to configure the virtual hosts for ubuntu?, even im using just one site?
thanks!
Have you read any of the actual mod_wsgi documentation or watch the presentation about it:
http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide
http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm=6#Conference_Presentations
You either never set up WSGIScriptAlias or didn’t enable the site for Apache properly to read it or didn’t restart Apache.