作者:BOSS | 来源:互联网 | 2023-05-17 01:14
I've got django running in uwsgi behind nginx. When I try to access https://site/admin/
I get the expected login screen. Logging in via the form seems to succeed, however, I simply end up back at the login screen. Firebug shows a redirect to the plain http://site/admin/
url which is then redirectec by nginx to the https url.
我在dginx后面的uwsgi中运行django。当我尝试访问https:// site / admin /时,我得到了预期的登录屏幕。通过表单登录似乎成功,但是,我只是回到登录屏幕。 Firebug显示重定向到普通的http:// site / admin / url,然后通过nginx将redirectec重定向到https网址。
Help! I'm confused as to how to force the admin app to use only https urls.
帮帮我!我很困惑如何强制管理应用程序只使用https网址。
Note this seems to be a related, unanswered question: https://example.com/admin redirects to https://admin in Django Nginx and gunicorn
请注意,这似乎是一个相关的,未回答的问题:https://example.com/admin重定向到https://管理员在Django Nginx和gunicorn
3 个解决方案