beta testing for mod_wsgi
Manlio Perillo
manlio_perillo at libero.it
Mon Jan 14 13:34:44 MSK 2008
Adrian Perez ha scritto:
> 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).
>
Ok, thanks
> 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
>
Note that here you do not need an extra script: you can just do in nginx
configuration:
env PYTHON_EGG_CACHE /tmp/test/eggs
location / {
wsgi_param trac.env_path /tmp/test
wsgi_pass /path/to/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!
>
Thanks, but it is all merit of nginx.
Manlio Perillo
More information about the nginx
mailing list