mod_wsgi -> Internal Server Error

498 views
Skip to first unread message

Charly

unread,
Jun 2, 2009, 3:19:33 PM6/2/09
to modwsgi
Hi everyone,
I'm trying to use mod_wsgi on my new server, but everything I get is
an Internal Server Error (500). My httpd.conf looks like:

WSGIScriptAlias / /var/www/laura/django.wsgi
ErrorLog logs/error.log

If I replace django.wsgi with a non-existing file, I get an 404 Error,
so I assume that mod_wsgi is working. I also got once the notice in
error.log:

[Tue Jun 02 20:04:16 2009] [notice] Apache/2.2.9 (Debian) mod_wsgi/2.3
Python/2.5.2 configured -- resuming normal operations

But I don't get any other error messages, and there is no sign, that
django.wsgi is really called, I tried to write into another log file
from django.wsgi but nothing happened. Because I installed the server
new, I think I've just forgotten something, maybe some configuration.
I have to admit, its the first time I'm installing a webserver. I hope
you can help me.
Best regards from Berlin, Charly

Tim Valenta

unread,
Jun 2, 2009, 3:57:24 PM6/2/09
to mod...@googlegroups.com
Are you able to successfully run your .wsgi file from the command line?  As in:

python django.wsgi

While in the directory of the django.wsgi.  It's usually pretty telling of any errors that pop up during initial startup.  Much easier to find and fix, that way.

Tim

Graham Dumpleton

unread,
Jun 3, 2009, 3:30:53 AM6/3/09
to mod...@googlegroups.com
2009/6/3 Charly <charly....@googlemail.com>:
>
> Hi everyone,
> I'm trying to use mod_wsgi on my new server, but everything I get is
> an Internal Server Error (500). My httpd.conf looks like:
>
> WSGIScriptAlias / /var/www/laura/django.wsgi
> ErrorLog logs/error.log

That cannot be all you have as additional configuration is needed beyond that.

Have you followed instructions in:

http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide

to get even a basic hello world program working before you dove head
first into trying to get something more complicated like Django
working?

Have you set LogLevel to 'info' as described in:

http://code.google.com/p/modwsgi/wiki/DebuggingTechniques

in order to get more information out mof_wsgi about what it is doing?

Please do those two things if you haven't already, or indicate that
you did successfully get a hello world application running. If you
have already, then supply the more complete configuration you are
using related to your WSGI application akin to what the configuration
guide says you are meant to be using. It cannot be just what you say
you are using.

For Django, the configuration you should be used and what the WSGI
file should look like is explained in:

http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango

Whether you did a hello world program first, is that the instructions
you were using?

Graham
Reply all
Reply to author
Forward
0 new messages