Problem with uWSGI and PATH_INFO

Roberto De Ioris roberto at
Thu Jul 27 15:25:05 UTC 2017

> Hi Roberto,
> Le 2017-07-27 à 09:52, Roberto De Ioris a écrit :
>>> Hi again, this is not what manage-script-name is for. It is a
>>> uWSGI-specific option for when you only PATH_INFO and you want to
>>> generate
>>> SCRIPT_NAME accordingly. This requires to "mount" apps under specific
>>> paths.
> Ok. I really don't want to "mount" my app under a specific script name.
>>> uWSGI by itself does not rewrite the vars passed by the webserver, if
>>> you
>>> want to do it you have to use internal routing accordingly (or use a
>>> WSGI
>>> middleware that is generally more handy and portable, albeit annoying
>>> if
>>> you already have an entry point)
> Nginx internal routing seems a reasonable choice here. My app is looking
> like this:
> dispatch-django.uwsgi:
> def application(environ, start_response):
>        wsgi_app = make_app()
>        return wsgi_app(environ, start_response)
> Then I invoke uwsgi like so:

I was meaning uWSGI internal routing :)

and yes, for manage-script-name to have effect you need to specify the
mountpoint of your app like described here:

(it is flask app but it is the same concept)

Roberto De Ioris

More information about the nginx mailing list