[Chicago] Help deploying Satchmo with WSGI

Jonathan Hayward christos.jonathan.hayward at gmail.com
Fri Jul 13 21:55:17 CEST 2012


Thank you.

It seems Apache is not recognizing WSGI, even though mods-enabled has
wsgi.conf and wsgi.load (and I have the Ubuntu libapache2-mod-wsgi and
others installed).

Can you tell from the output below what's wrong with the WSGI installation
in Apache2?

[Fri Jul 13 19:52:47 2012] [info] mod_wsgi (pid=13374): Create interpreter '
django.jonathanscorner.com|'.
[Fri Jul 13 19:52:47 2012] [info] [client 205.197.161.146] mod_wsgi
(pid=13374, process='', application='django.jonathanscorner.com|'): Loading
WSGI script '/home/jonathan/jonathantest/wsgi.py'.
[Fri Jul 13 19:52:47 2012] [error] [client 205.197.161.146] mod_wsgi
(pid=13374): Target WSGI script '/home/jonathan/jonathantest/wsgi.py'
cannot be loaded as Python module.
[Fri Jul 13 19:52:47 2012] [error] [client 205.197.161.146] mod_wsgi
(pid=13374): Exception occurred processing WSGI script
'/home/jonathan/jonathantest/wsgi.py'.
[Fri Jul 13 19:52:47 2012] [error] [client 205.197.161.146] Traceback (most
recent call last):
[Fri Jul 13 19:52:47 2012] [error] [client 205.197.161.146]   File
"/home/jonathan/jonathantest/wsgi.py", line 7, in <module>
[Fri Jul 13 19:52:47 2012] [error] [client 205.197.161.146]     from
django.core.wsgi import get_wsgi_application
[Fri Jul 13 19:52:47 2012] [error] [client 205.197.161.146] ImportError: No
module named wsgi
[Fri Jul 13 19:52:47 2012] [info] [client 205.197.161.146] mod_wsgi
(pid=13374, process='', application='django.jonathanscorner.com|'): Loading
WSGI script '/home/jonathan/jonathantest/wsgi.py'.
[Fri Jul 13 19:52:47 2012] [error] [client 205.197.161.146] mod_wsgi
(pid=13374): Target WSGI script '/home/jonathan/jonathantest/wsgi.py'
cannot be loaded as Python module.
[Fri Jul 13 19:52:47 2012] [error] [client 205.197.161.146] mod_wsgi
(pid=13374): Exception occurred processing WSGI script
'/home/jonathan/jonathantest/wsgi.py'.
[Fri Jul 13 19:52:47 2012] [error] [client 205.197.161.146] Traceback (most
recent call last):
[Fri Jul 13 19:52:47 2012] [error] [client 205.197.161.146]   File
"/home/jonathan/jonathantest/wsgi.py", line 7, in <module>
[Fri Jul 13 19:52:47 2012] [error] [client 205.197.161.146]     from
django.core.wsgi import get_wsgi_application
[Fri Jul 13 19:52:47 2012] [error] [client 205.197.161.146] ImportError: No
module named wsgi
[Fri Jul 13 19:52:47 2012] [debug] mod_deflate.c(615): [client
205.197.161.146] Zlib: Compressed 769 to 441 : URL /
[Fri Jul 13 19:52:48 2012] [error] [client 205.197.161.146] File does not
exist: /home/jonathan/jonathantest/static
[Fri Jul 13 19:52:48 2012] [info] mod_wsgi (pid=13437): Create interpreter '
django.jonathanscorner.com|'.
[Fri Jul 13 19:52:48 2012] [info] [client 205.197.161.146] mod_wsgi
(pid=13437, process='', application='django.jonathanscorner.com|'): Loading
WSGI script '/home/jonathan/jonathantest/wsgi.py'.
[Fri Jul 13 19:52:48 2012] [error] [client 205.197.161.146] mod_wsgi
(pid=13437): Target WSGI script '/home/jonathan/jonathantest/wsgi.py'
cannot be loaded as Python module.
[Fri Jul 13 19:52:48 2012] [error] [client 205.197.161.146] mod_wsgi
(pid=13437): Exception occurred processing WSGI script
'/home/jonathan/jonathantest/wsgi.py'.
[Fri Jul 13 19:52:48 2012] [error] [client 205.197.161.146] Traceback (most
recent call last):
[Fri Jul 13 19:52:48 2012] [error] [client 205.197.161.146]   File
"/home/jonathan/jonathantest/wsgi.py", line 7, in <module>
[Fri Jul 13 19:52:48 2012] [error] [client 205.197.161.146]     from
django.core.wsgi import get_wsgi_application
[Fri Jul 13 19:52:48 2012] [error] [client 205.197.161.146] ImportError: No
module named wsgi
[Fri Jul 13 19:52:48 2012] [debug] mod_deflate.c(615): [client
205.197.161.146] Zlib: Compressed 432 to 297 : URL /favicon.ico

On Fri, Jul 13, 2012 at 2:43 PM, Martin Maney <maney at two14.net> wrote:

> On Fri, Jul 13, 2012 at 01:19:16PM -0500, Jonathan Hayward wrote:
> > My wsgi.py is copied
> > from /usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py
>
> That's Django's internals, not the script you need.  It's four lines of
> code, but needs the default path string changed to match your project.
>
>   https://docs.djangoproject.com/en/1.4/howto/deployment/wsgi/
>
> Linked from the description of the changed WSGI support in the release
> notes and perhaps from other places.
>
> --
> Happy Holidays!  Cry "Charge it!" and let slip the dogs of more.
>
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> http://mail.python.org/mailman/listinfo/chicago
>



-- 
[image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
Jonathan Hayward, an Orthodox Christian author.

*Amazon* <https://www.amazon.com/author/cjshayward> • Author
Bio<http://jonathanscorner.com/author/>
 • *Email <christos.jonathan.hayward at gmail.com>* •
Facebook<http://www.facebook.com/christos.jonathan.hayward>
 • Google Plus <http://jonathanscorner.com/plus> •
*Kindle<http://stornge.com/amazon>
* • LinkedIn <http://www.linkedin.com/in/jonathanhayward> •
Twitter<http://twitter.com/JonathansCorner>
 • *Web <http://jonathanscorner.com/>* • What's
New?<http://jonathanscorner.com/>
I invite you to visit my "theology, literature, and other creative works"
site. *See a random page! <http://random.jonathanscorner.com/>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20120713/e2d0ee4c/attachment.html>


More information about the Chicago mailing list