Django prefix on all generated URLs

后端 未结 2 1464
独厮守ぢ
独厮守ぢ 2021-02-14 10:21

My proxy (nginx public port 80) to django (gunicorn wsgi localhost port 8000) strips off the path to the application \"/app\" so requests for http://server/app/hello

2条回答
  •  天涯浪人
    2021-02-14 11:08

    See documentation for FORCE_SCRIPT_NAME:

    https://docs.djangoproject.com/en/dev/ref/settings/#force-script-name

    Set that to be '/app' instead of default of None.

提交回复
热议问题