Problem with uWSGI and PATH_INFO

Etienne Robillard tkadm30 at yandex.com
Thu Jul 27 12:52:36 UTC 2017


Hi Roberto,

My Django app runs perfectly ok under FastCGI and nginx but is not 
capable of resolving the proper PATH_INFO under uWSGI. In 
fastcgi_params, the value of PATH_INFO and SCRIPT_NAME are set to 
"$fastcgi_script_name". My nginx config looks like this:

location / {

  uwsgi_pass django;

include uwsgi_params;

}

My wsgi app (django-hotsauce) really relay on a HTTP/1.1 compatible 
PATH_INFO value, just like in wsgiref. Why is it not possible to 
implement $uwsgi_script_name variable for nginx?

Best regards,
Etienne


Le 2017-07-27 à 08:36, Roberto De Ioris a écrit :
>
>> Hi, this is an example on how to configure multiple apps:
>>
>> http://uwsgi-docs.readthedocs.io/en/latest/Snippets.html#multiple-flask-apps-in-different-mountpoints
>>
>> Best thing to do is completely avoid nginx manipulating the SCRIPT_NAME
>> variable.
>>
>>
>> Even when under fastcgi, the WSGI standard expects a different meaning for
>> SCRIPT_NAME
>>

-- 
Etienne Robillard
tkadm30 at yandex.com
http://www.isotopesoftware.ca/



More information about the nginx mailing list