加入收藏 | 设为首页 | 会员中心 | 我要投稿 安卓应用网 (https://www.0791zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 运营中心 > Nginx > 正文

Django应用程序在运行服务器下运行,但在nginx下运行404

发布时间:2020-05-23 03:14:17 所属栏目:Nginx 来源:互联网
导读:在“ python manage.py runserver .....”下运行时,我的Django应用在服务器上运行良好,但是在nginx / fastcgi下运行时,得到了404.这是错误消息: Page not found (404) Request Method: GET Request URL: blah.youtrain.me/a

在“ python manage.py runserver …..”下运行时,我的Django应用在服务器上运行良好,但是在nginx / fastcgi下运行时,得到了404.

这是错误消息:

Page not found (404)
Request Method: GET
Request URL: blah.youtrain.me/admin/ (I removed the http due to StackOverflow constraints for new account)

Using the URLconf defined in youtrainme.urls,Django tried these URL patterns,in this order:

^admin/doc/
^admin/

The current URL,didn’t match any of these.

无论我在nginx下进入应用程序的哪个页面,它始终显示相同的错误消息:“当前URL,与任何这些都不匹配.”

在nginx下,如果我只是转到blah.youtrain.me,则上面的请求URL更改为:blah.youtrain.me//< ---注意结尾的斜杠.但是,在runserver下,“请求URL”行中没有结尾斜杠.这可能会提供一些见解? 任何帮助将不胜感激!

(编辑:安卓应用网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读