Thanks. I'll re-install Django then.

On Jan 26, 2:56 pm, Graham Dumpleton <[email protected]>
wrote:
> On 27 January 2011 02:02, octopusgrabbus <[email protected]> wrote:
>
>
>
> > mod_wsgi now loaded. from apache2ctl -M
> >  wsgi_module (shared)
>
> > Here is an excerpt of the apache error log
> > [Wed Jan 26 09:57:55 2011] [error] [client 127.0.0.1] Traceback (most
> > recent cal
> > l last):
> > [Wed Jan 26 09:57:55 2011] [error] [client 127.0.0.1]   File "/home/
> > amr/django/d
> > jango.wsgi", line 9, in <module>
> > [Wed Jan 26 09:57:55 2011] [error] [client 127.0.0.1]     import
> > django.core.han
> > dlers.wsgi
> > [Wed Jan 26 09:57:55 2011] [error] [client 127.0.0.1] ImportError: No
> > module nam
> > ed django.core.handlers.wsgi
>
> You don't have Django installed. Or you have multiple Python
> installations and Django is installed for different Python
> installation than mod_wsgi was compiled for and is using. Or you
> installed Django into a virtualenv or local directory and didn't say
> in your WSGI script file where that was.
>
> So, not a problem with mod_wsgi itself, just how you are setting up
> your WSGI script file and/or environment.
>
> Graham
>
> > [Wed Jan 26 09:57:58 2011] [error] [client 127.0.0.1] mod_wsgi
> > (pid=4048): Targe
> > t WSGI script '/home/amr/django/django.wsgi' cannot be loaded as
> > Python module.
> > [Wed Jan 26 09:57:58 2011] [error] [client 127.0.0.1] mod_wsgi
> > (pid=4048): Excep
> > tion occurred processing WSGI script '/home/amr/django/django.wsgi'.
>
> > On Jan 26, 9:37 am, octopusgrabbus <[email protected]> wrote:
> >> mod_wsgi does appear to be installed
>
> >> /usr/lib/apache2/modules/mod_wsgi.so
> >> -> mod_wsgi.so-2.6
>
> >> On Jan 26, 9:17 am, octopusgrabbus <[email protected]> wrote:
>
> >> > I've issued this command:
>
> >> > dbadmin@steamboy:~$ sudo apt-get install libapache2-mod-wsgi
> >> > Reading package lists... Done
> >> > Building dependency tree
> >> > Reading state information... Done
> >> > libapache2-mod-wsgi is already the newest version.
> >> > 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
>
> >> > Then, I've issued this command and gotten this error:
>
> >> > dbadmin@steamboy:~$ sudo a2enmod mod-wsgi
> >> > ERROR: Module mod-wsgi does not exist!
>
> >> > Is there a step I'm missing?
>
> >> > On Jan 25, 5:07 pm, Graham Dumpleton <[email protected]>
> >> > wrote:
>
> >> > > On 26 January 2011 04:48, octopusgrabbus <[email protected]> 
> >> > > wrote:
>
> >> > > > I am working my way through various apache error log messages trying
> >> > > > to move my application from mod_python to mod_wsgi. Currently
> >> > > > WSGIScriptAlias can't be loaded, and I am trying to understand what
> >> > > > corrections need to be made for it to load.
>
> >> > > Do you mean that Apache will not even recognise the WSGIScriptAlias 
> >> > > directive?
>
> >> > > You are going to have to be more specific about the error message you
> >> > > see in the browser and in the Apache error log files.
>
> >> > > You are also possibly missing some configuration. I really recommend 
> >> > > you watch:
>
> >> > >  http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm=6#Conference_...
>
> >> > > That does start out though on the assumption that you have actually
> >> > > enabled the mod_wsgi module in Apache first though.
>
> >> > > You can check whether mod_wsgi is loaded by using '-M' option to
> >> > > Apache on command line:
>
> >> > >  http://code.google.com/p/modwsgi/wiki/CheckingYourInstallation#Apache...
>
> >> > > Graham
>
> >> > > > Here is my apache configuration for Django and mod_wsgi
>
> >> > > > # Virtual hosts
> >> > > > #
>
> >> > > > Listen 9090
> >> > > > <VirtualHost _default_:9090>
> >> > > > WSGIScriptAlias / /home/amr/django/django.wsgi
> >> > > > Alias /media /home/amr/django/amr/media
> >> > > > </VirtualHost>
>
> >> > > > Here is django.wsgi
>
> >> > > > import os
> >> > > > import sys
> >> > > > path = '/home/amr/django/amr'
> >> > > > if path not in sys.path:
> >> > > >    sys.path.append(path)
>
> >> > > > os.environ['DJANGO_SETTINGS_MODULE'] = 'amr.settings'
>
> >> > > > import django.core.handlers.wsgi
> >> > > > application = django.core.handlers.wsgi.WSGIHandler()
>
> >> > > > --
> >> > > > You received this message because you are subscribed to the Google 
> >> > > > Groups "modwsgi" group.
> >> > > > To post to this group, send email to [email protected].
> >> > > > To unsubscribe from this group, send email to 
> >> > > > [email protected].
> >> > > > For more options, visit this group 
> >> > > > athttp://groups.google.com/group/modwsgi?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "modwsgi" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to 
> > [email protected].
> > For more options, visit this group 
> > athttp://groups.google.com/group/modwsgi?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to