Re: Looking for documention on deploying roundup with mod_wsgi

"John P. Rouillard" <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.user
Message-ID <[email protected]>
Hi Thomas:

Thanks for the notes, I have a few questions.

In message <[email protected]>,
Thomas Arendsen Hein writes:
>Not with so much detail, but here are some snippets that might be
>useful:

I am using your wsgi as the example wsgi script for the WSGI Handler
section since it seems the script that was there was broken. I like
the ability to shut off the script for maintenance.

It has been a while since I used apache, so a few questions on the config.

>On Debian install apache2 with libapache2-mod-wsgi
>/etc/apache2/sites-available/roundup:
>
>    ServerAdmin [email protected]
>    ErrorLog /var/log/apache2/error.log
>
>    LogLevel notice
>
>    DocumentRoot /var/www/
>

Listen at port 80

>    <VirtualHost *:80>
>            CustomLog /var/log/apache2/access.log vhost_combined
>
>            Alias /doc/ /home/roundup/install/share/doc/roundup/html/


I assume this allows apache to directly serve up static files like css
etc rather than going through the wsgi roundup instance?

>            Alias /foo/@@file/ /srv/roundup/foo/html/

Remap /foo to /foo/ I assume?

>            RedirectMatch permanent ^/(foo)$ /$1/
>            WSGIDaemonProcess roundup-foo display-name=roundup-foo user=roundup-foo group=roundup-foo threads=25

This makes /foo run the wsgi script and pass remaining url path
to the wsgi as path info and query args?

>            WSGIScriptAlias /foo /srv/roundup/foo/roundup.wsgi
>            <Location /foo>
>                    WSGIProcessGroup roundup-foo
>            </Location>
>    </VirtualHost>
>
>(https can be configured here, too, but we do this elsewhere)

Do you have an example stanza to enable https?

>Use "a2ensite roundup" and "a2dissite default" to enable only the
>roundup configuration.

What happens if you don't turn off default?

>Install roundup as user "roundup":
>
>  python setup.py build_doc
>  python setup.py sdist --manifest-only
>  python setup.py install --home="/home/roundup/install" --force
>
>User "roundup-foo" has the following things in /home/roundup-foo/:
>- directory "db" (roundup data)
>- symlink "instance" pointing to /srv/roundup/foo
>
>Instances are created as user "roundup" below /srv/roundup/

Gotcha so far.

>/srv/roundup/foo/ contains the Roundup instance and the file
>roundup.wsgi:
>
>    import sys, os
>    sys.stdout = sys.stderr
>
>    enabled = True
>
>    if enabled:
>        sys.path.insert(0, '/home/roundup/install/lib/python')
>        # obtain the WSGI request dispatcher
>        from roundup.cgi.wsgi_handler import RequestDispatcher
>        tracker_home = os.path.join(os.getcwd(), 'instance')

This line I don't get. Does apache or mod_wsgi automatically cd to
/home/roundup-foo and how does it know to start there?

>        application = RequestDispatcher(tracker_home)

and magic happens....

--
				-- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.