[Chicago] Help deploying Satchmo with WSGI

Martin Maney maney at two14.net
Wed Jul 4 01:31:17 CEST 2012


On Mon, Jul 02, 2012 at 07:34:53PM -0500, Jonathan Hayward wrote:
> Forgive me; I had already used search engine. The top (albeit 1.1) entry
> for "django wsgi tutorial", which did not reference later versions, was
> https://docs.djangoproject.com/en/1.1/howto/deployment/modwsgi/

I hate google pages that begin with the all too often outdated,
misleading, or just plain rong "answers" from segfault (or serverfault,
though IMLE that one seems less prone to having old kluges that are
stuck as best answers).  So here's what I have, in somwhat of a fastcgi
flavored setup (you can tell what I first found to use instead of plain
ol' CGI for Python web stuff).

<VirtualHost *:80>
    ServerName homeroast.two14.net

    ... some minimal stock server config stuff (you do need a
    ... DocumentRoot even though it's overlain by the dynamic site here)

    ### homeroast WSGI application configuration

    WSGIScriptAlias / /home/maney/Sites/homeroast.two14.net/homeroast/wsgi.py
    WSGIDaemonProcess homeroast user=maney group=maney python-path=/home/maney/Sites/homeroast.two14.net
    WSGIProcessGroup homeroast

    <Directory /home/maney/Sites/homeroast.two14.net/homeroast>
        <Files wsgi.py>
            Order deny,allow
            Allow from all
        </Files>
    </Directory>

</VirtualHost>

The wsgi.py is exactly what 1.4 sets up.  I have taken advantage of
having the project's root directory relatively barren of Django's
config and directories in the 1.4 layout and have a few symlinks there
to libraries that are installed specifically for this project -
simplifies the pathing issues tremendously, especially for the ones
that are running out of git clones.

mod_wsgi is like Django, in that it has voluminous docs which surprise
you by not explaining many important details if you aren't doing things
quite the way the exposition was written to describe.  :-(

-- 
The theory of multiple intelligences fundamentally conflates
intelligence and motivation.  -- Christopher J. Ferguson



More information about the Chicago mailing list