[uWSGI] Problem with cherokee (app: -1)

Roberto De Ioris roberto at unbit.it
Mon Jul 12 19:20:13 CEST 2010

> I start uwsgi with:
> uwsgi --socket --wsgi-file x.wsgi

> and I have the uWsgi handler in Cherokee set for the /wsgi "directory":

The problem is here, if you configure cherokee in this way, you are telling
uWSGI (or fastcgi or scgi or whatever CGI technology) that the SCRIPT_NAME
is set to "/wsgi"

So you cannot use Graham Dumpleton's mod_wsgi files, but you have to use
uwsgi module:

import uwsgi

def application(env, start_response):

uwsgi.application = {'/wsgi':application}

(remember that this module must be in the pythonpath)

in this way you are creating a WSGI app under the "/wsgi" SCRIPT_NAME

This has nothing to do with cherokee or uWSGI. This is how the WSGI
standard works.

Roberto De Ioris

More information about the uWSGI mailing list