beta testing for mod_wsgi

Adrian Perez adrianperez at udc.es
Mon Jan 14 05:49:27 MSK 2008


El Sat, 12 Jan 2008 20:50:47 +0100
Adrian Perez <adrianperez at udc.es> escribió:

> Nginx without using mod_wsgi features works as expected, I will be
> done some testing in the next 2-3 days.

Rewarding this, it looks like all test scripts included with mod_wsgi
run without problems in my laptop  (x86-64, Intel Core2, Gentoo Linux).

The shocking news: I have been able of running Trac 0.11 beta1 with
mod_wsgi! The configuration snippets looks like this:

  server {
    listen    127.0.0.1;
    server_name localhost;

    root /var/www/localhost/htdocs;

    include wsgi_vars;

    location /login {
      auth_basic "Trac";
      auth_basic_user_file /tmp/test/passwd;
      wsgi_pass /tmp/test/run.wsgi;
    }
    location / {
      wsgi_pass /tmp/test/run.wsgi;
    }
  }

The idea of adding an extra "/login" location for authentication was
taken from http://trac.edgewall.org/wiki/TracCgi

The "run.wsgi" file contents are as follows (inspiration taken from
http://trac.edgewall.org/wiki/TracModWSGI):

  import os, trac.web.main
  os.environ["TRAC_ENV"] = "/tmp/test"
  os.environ["PYTHON_EGG_CACHE"] = "/tmp/test/eggs"
  application = trac.web.main.dispatch_request

Next test will be Bazaar's smart-server over HTTP, as it is also a WSGI
application.

Manlio you rock! I am getting very excited about this stuff!

-- 
Voodoo is a very interesting religion for the whole family, even those
members of it who are dead.
        -- (Terry Pratchett & Neil Gaiman, Good Omens)





More information about the nginx mailing list