Nginx uswgi django subpath without uwsgi_modifier1 30; -
i've deploy django app running under subpath.
this uswgi.ini file:
[uwsgi] socket = :3031 http= :9000 chdir = . wsgi-file = docker.wsgi processes = 4 threads = 2 stats = :9191 enable-threads = true
and nginx conf file
server { location /my/subpath { include uwsgi_params; uwsgi_pass django:3031; } }
now configuration django fails match urls since expect accepting request @ /
, not @ /my/subpath
if modify nginx conf this:
server { location /my/subpath { include uwsgi_params; uwsgi_pass django:3031; uwsgi_param script_name /my/subpath; uwsgi_modifier1 30; } }
it works, but
note: ancient uwsgi versions used support called “uwsgi_modifier1 30” approach. not it. ugly hack (source)
i can't head around on how configure nginx make working.
from documentation of uwsgi there's possibility use mount
point, can't figure out how should change uwsgi.ini file make working.
honestly, fix nginx file , not uwsgi.ini if possible.
Comments
Post a Comment