Problem with uWSGI and PATH_INFO

Roberto De Ioris roberto at
Thu Jul 27 13:52:09 UTC 2017

> Hi Roberto,
> I use gevent-fastcgi for production. I wish to have the time to dive in
> the internals of uWSGI to understand how PATH_INFO and SCRIPT_NAME gets
> rewritten by uWSGI. I believe the implementation of --manage-script-name
> is incorrect and should be fixed to support having a empty or not set
> SCRIPT_NAME value.
> Etienne

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

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)

Roberto De Ioris

More information about the nginx mailing list