modwsgi Configuration
I'm trying to configure django with mod wsgi.
I put mysite in /home/mariano/mysite create with django 1.3, running
the development server works ok.
When I try it to configure with apache2 with mod_wsgi I get 500 error:
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
---------------------------------------------------------------------------------------------------
the httpd.conf:
---------------------------------------------------------------------------------------------------
WSGIScriptAlias /mysite /home/mariano/mysite/apache/django.wsgi
---------------------------------------------------------------------------------------------------
the /home/mariano/mysite/apache/django.wsgi file:
---------------------------------------------------------------------------------------------------
import os
import sys
path = '/home/mariano/mysite'
if path not in sys.path:
sys.path.append(path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
when i change the httpd.conf with another wsgi in the same folderfile
it load ok!
---------------------------------------------------------------------------------------------------
/home/mariano/mysite/apache/django2.wsgi
---------------------------------------------------------------------------------------------------
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]
Due that I think the problem is in the wsgi file that call the
django.core.handlers.wsgi.WSGIHandler()
I very new in Django, I'm trying to make this work to then configure
django 1.1.4 in the same machine, to use it with lfs shop.
I have my web in joomla and it's too slow I try lfs and it's great but
I can only use it with django server....
Thanks
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home