hi Folks
I'm trying to deploy my wsgi application in an apache fastcgi
environment.
The particular server concerned is delivering a lot of stuff to other
applications under the same hostname, so I came up with this for
my apache directives:
<IfModule mod_fastcgi.c>
Alias /browse "/var/www/fastcgi/ndg"
Alias /layout "/var/www/fastcgi/ndg"
<Directory /var/www/fastcgi>
SetHandler fastcgi-script
Order allow,deny
Allow from all
</Directory>
# following socket ought to be setup by paste via ndg.ini
FastCgiExternalServer /var/www/fastcgi/ndg
-socket /tmp/ndg_fastcgi.soc
</IfModule>
And I was using paste#urlmap to handle these with something like this:
[composite:main]
use=egg:paste#urlmap
/browse=ndgWrapGateBrowse
/layout=layout
...
This fails with a wsgi "not found" error from paste. Investigating what
is going on by putting a wsgi environment printer in composite:main
(instead of urlmap) shows the overall config works (from apache to paste
deploy), but maybe the way I've set up my apache environment doesn't
quite do what urlmap wants (I think): In particular, path_info is empty.
Could that be the problem? Anyway, this is the environment that apache
gives to urlmap (with a touch of censorship):
* wsgi.multiprocess:False
* SERVER_SOFTWARE:Apache/2.0.46 (Red Hat)
* SCRIPT_NAME:/browse
* SERVER_SIGNATURE:
Apache/2.0.46 (Red Hat) Server at censored.host Port 80
* REQUEST_METHOD:GET
* PATH_INFO:
* SERVER_PROTOCOL:HTTP/1.1
* QUERY_STRING:
* PATH:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
* HTTP_ACCEPT_CHARSET:utf-8, utf-8;q=0.5, *;q=0.5
* HTTP_USER_AGENT:Mozilla/5.0 (compatible; Konqueror/3.5; Linux)
KHTML/3.5.2 (like Gecko) Kubuntu 6.06 Dapper
* HTTP_CONNECTION:Keep-Alive
* SERVER_NAME:censored.host
* REMOTE_ADDR:a.b.c.d
* wsgi.url_scheme:http
* SERVER_PORT:80
* SERVER_ADDR:e.f.g.h
* DOCUMENT_ROOT:/var/www/html
* HTTP_PRAGMA:no-cache
* PYTHONPATH:/var/www/cgi-bin
* SCRIPT_FILENAME:/var/www/fastcgi/ndg
* SERVER_ADMIN:blah
* wsgi.input:
* HTTP_HOST:censored.host
* wsgi.multithread:True
* HTTP_CACHE_CONTROL:no-cache
* REQUEST_URI:/browse
* HTTP_ACCEPT:text/html, image/jpeg, image/png, text/*, image/*,
*/*
* wsgi.version:(1, 0)
* GATEWAY_INTERFACE:CGI/1.1
* wsgi.run_once:False
* wsgi.errors:
* REMOTE_PORT:35936
* HTTP_ACCEPT_LANGUAGE:en
* HTTP_ACCEPT_ENCODING:x-gzip, x-deflate, gzip, deflate
* UNIQUE_ID:KYlj6H8AAAEAAAuJrgQAAAAC
Maybe I could write my own middleware to fix this, but is there an
easier way (better fastcgi config on the apache side? Should I, could I,
use paste prefix middleware?)
Thanks in advance
Bryan
_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users