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

在“ 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”行中没有结尾斜杠.这可能会提供一些见解? 任何帮助将不胜感激!

dawei

【声明】:淮南站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。