django - 在 heroku 上部署 django 应用程序 - 在服务器上找不到请求的 URL

标签 django heroku deployment

我一直在关注 djangogirl 的教程 http://tutorial.djangogirls.org/en/deploy/README.html,了解如何在 Heroku 上部署 Django 应用程序。我在这方面完全是个新手,所以很多东西对我来说就像黑魔法,而且我对正在发生的事情有一个非常模糊的想法。但是,从创建我的应用程序到将其推送到远程存储库并运行网络进程,我似乎已经能够让一切顺利进行。

>heroku create
>git push heroku master
>heroku ps:scale web=1

此后当我打开应用程序的 URL 时,我会看到“在此服务器上找不到请求的 URL”错误页面,教程说这是预期的,因为我没有填满空数据库。所以它说要运行

>heroku run python manage.py migrate
>heroku run python manage.py createsuperuser

当我运行它们时,这两个命令似乎都能正常执行。我尝试再次运行 manage.py migrate 只是为了确定,但它只是说没有更多的迁移可以应用。我可以正常登录到管理页面,但尝试打开应用程序 URL 本身仍然给我一个“在此服务器上找不到请求的 URL”错误页面,即使在我应用迁移之后也是如此。

就像我说的,我是一个真正的新手,所以我不知道该如何解决这个问题。我一直在逐步学习教程,但不知道哪里出错了。非常感谢您的帮助。

编辑: 以下是 heroku info -s 的输出:

    addons=heroku-postgresql:hobby-dev
    archived_at=
    buildpack_provided_description=Python
    create_status=complete
    created_at=2015/02/10 05:02:00 -0800
    domain_name=aqiblog.herokuapp.com
    dynos=1
    git_url=https://git.heroku.com/aqiblog.git
    id=33873439
    name=aqiblog
    owner_delinquent=false
    owner_email=***
    owner_name=***
    region=us
    released_at=2015/02/10 05:33:50 -0800
    repo_migrate_status=complete
    repo_size=9458
    requested_stack=
    slug_size=53579300
    stack=cedar-14
    updated_at=2015/02/10 06:04:30 -0800
    web_url=https://aqiblog.herokuapp.com/
    workers=0

这是 heroku logs 的输出。在我未经训练的眼睛看来,没有什么不寻常的:

2015-02-10T14:04:49.315067+00:00 heroku[router]: at=info method=GET path="/" hos
t=aqiblog.herokuapp.com request_id=15e74a24-32e9-4a74-ab2f-696c63853b72 fwd="183
.90.125.206" dyno=web.1 connect=1ms service=4ms status=404 bytes=267
2015-02-10T14:06:59.516339+00:00 heroku[router]: at=info method=GET path="/" hos
t=aqiblog.herokuapp.com request_id=12b8b705-4820-46c4-9195-a04740ad138a fwd="183
.90.125.206" dyno=web.1 connect=6ms service=7ms status=404 bytes=267
2015-02-10T14:20:16.661117+00:00 heroku[router]: at=info method=GET path="/" hos
t=aqiblog.herokuapp.com request_id=599be313-368a-4f66-900f-a459ef42b9ff fwd="183
.90.125.206" dyno=web.1 connect=1ms service=5ms status=404 bytes=267
2015-02-10T14:30:13.477370+00:00 heroku[router]: at=info method=GET path="/admin
/" host=aqiblog.herokuapp.com request_id=91f04bfd-e7b9-41a4-b905-4b7d26861cc5 fw
d="183.90.125.206" dyno=web.1 connect=2ms service=43ms status=302 bytes=391
2015-02-10T14:30:13.800060+00:00 heroku[router]: at=info method=GET path="/admin
/login/?next=/admin/" host=aqiblog.herokuapp.com request_id=301b7aee-0f48-432f-a
9a9-6696b14fe6be fwd="183.90.125.206" dyno=web.1 connect=1ms service=55ms status
=200 bytes=2368
2015-02-10T14:30:14.193976+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/css/base.css" host=aqiblog.herokuapp.com request_id=d04f60ed-eef6-4678-a
3f0-e133b55df175 fwd="183.90.125.206" dyno=web.1 connect=1ms service=3ms status=
304 bytes=136
2015-02-10T14:30:14.463950+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/css/login.css" host=aqiblog.herokuapp.com request_id=35ba7b7f-8ca2-40e5-
b274-5a33138a7478 fwd="183.90.125.206" dyno=web.1 connect=3ms service=6ms status
=304 bytes=136
2015-02-10T14:30:14.845040+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/img/nav-bg.gif" host=aqiblog.herokuapp.com request_id=6b9ba7e5-b520-46d2
-ae47-776340e6eac4 fwd="183.90.125.206" dyno=web.1 connect=3ms service=4ms statu
s=304 bytes=136
2015-02-10T14:30:31.563636+00:00 heroku[router]: at=info method=POST path="/admi
n/login/?next=/admin/" host=aqiblog.herokuapp.com request_id=8cb9b343-f93d-4f14-
9803-592614b17b2f fwd="183.90.125.206" dyno=web.1 connect=2ms service=132ms stat
us=302 bytes=625
2015-02-10T14:30:31.910829+00:00 heroku[router]: at=info method=GET path="/admin
/" host=aqiblog.herokuapp.com request_id=12df9c3c-4b60-4446-9094-ef567912c19f fw
d="183.90.125.206" dyno=web.1 connect=1ms service=68ms status=200 bytes=3837
2015-02-10T14:30:32.260761+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/css/dashboard.css" host=aqiblog.herokuapp.com request_id=194ab120-f85f-4
78f-bd05-2bd5b424177d fwd="183.90.125.206" dyno=web.1 connect=2ms service=4ms st
atus=304 bytes=136
2015-02-10T14:30:32.558809+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/img/icon_addlink.gif" host=aqiblog.herokuapp.com request_id=b1867188-e93
5-42eb-a12e-3342d6b09fd2 fwd="183.90.125.206" dyno=web.1 connect=2ms service=3ms
 status=304 bytes=136
2015-02-10T14:30:32.556672+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/img/default-bg.gif" host=aqiblog.herokuapp.com request_id=c9cd25cf-5bd9-
49ca-acb8-78c14d1cdffd fwd="183.90.125.206" dyno=web.1 connect=2ms service=4ms s
tatus=304 bytes=136
2015-02-10T14:30:32.958179+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/img/icon_changelink.gif" host=aqiblog.herokuapp.com request_id=46672886-
026d-4e44-bbda-0a46c738688f fwd="183.90.125.206" dyno=web.1 connect=3ms service=
4ms status=304 bytes=136
2015-02-10T14:30:37.016120+00:00 heroku[router]: at=info method=GET path="/admin
/blog/post/" host=aqiblog.herokuapp.com request_id=024f5a16-2afa-46ae-901f-d9c95
d7ffac8 fwd="183.90.125.206" dyno=web.1 connect=2ms service=89ms status=200 byte
s=3466
2015-02-10T14:30:37.392657+00:00 heroku[router]: at=info method=GET path="/admin
/jsi18n/" host=aqiblog.herokuapp.com request_id=175746a8-6269-499c-9539-e94442df
3740 fwd="183.90.125.206" dyno=web.1 connect=3ms service=45ms status=200 bytes=2
551
2015-02-10T14:30:37.353918+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/css/changelists.css" host=aqiblog.herokuapp.com request_id=4b1968b8-5977
-49d2-92c7-7f8e6f83bcce fwd="183.90.125.206" dyno=web.1 connect=2ms service=5ms
status=200 bytes=5523
2015-02-10T14:30:37.353954+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/js/core.js" host=aqiblog.herokuapp.com request_id=2765ef40-cf94-4e80-af2
3-df2bd41c29fd fwd="183.90.125.206" dyno=web.1 connect=1ms service=3ms status=20
0 bytes=7182
2015-02-10T14:30:37.664695+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/js/admin/RelatedObjectLookups.js" host=aqiblog.herokuapp.com request_id=
ab90b0a5-c743-4a36-8cf8-a45bcdb26c10 fwd="183.90.125.206" dyno=web.1 connect=2ms
 service=3ms status=200 bytes=3515
2015-02-10T14:30:37.676047+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/js/jquery.min.js" host=aqiblog.herokuapp.com request_id=d793e5e6-f05c-41
7a-bc14-c726b217a873 fwd="183.90.125.206" dyno=web.1 connect=2ms service=11ms st
atus=200 bytes=92913
2015-02-10T14:30:37.672663+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/js/jquery.init.js" host=aqiblog.herokuapp.com request_id=7494223b-6a43-4
861-93c6-8a902e8f0b1f fwd="183.90.125.206" dyno=web.1 connect=3ms service=3ms st
atus=200 bytes=608
2015-02-10T14:30:37.922666+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/js/actions.min.js" host=aqiblog.herokuapp.com request_id=4481557e-e808-4
5c7-9948-2856409b9f9c fwd="183.90.125.206" dyno=web.1 connect=3ms service=4ms st
atus=200 bytes=3320
2015-02-10T14:30:39.773435+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/img/tooltag-add.png" host=aqiblog.herokuapp.com request_id=d1e06eca-e54e
-44a4-b4c6-b834751c52b8 fwd="183.90.125.206" dyno=web.1 connect=3ms service=3ms
status=200 bytes=371
2015-02-10T14:30:39.795367+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/img/nav-bg-reverse.gif" host=aqiblog.herokuapp.com request_id=7df78871-e
7a8-4a47-9260-7b1f715b2293 fwd="183.90.125.206" dyno=web.1 connect=2ms service=2
ms status=304 bytes=136
2015-02-10T14:30:43.715783+00:00 heroku[router]: at=info method=GET path="/admin
/blog/" host=aqiblog.herokuapp.com request_id=c8c26fb6-7c06-424a-96a3-ed7d7acf52
15 fwd="183.90.125.206" dyno=web.1 connect=2ms service=62ms status=200 bytes=260
6
2015-02-10T14:30:44.051139+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/css/base.css" host=aqiblog.herokuapp.com request_id=a9525efc-ca5b-40a2-b
79c-0d1c7ea8f323 fwd="183.90.125.206" dyno=web.1 connect=3ms service=2ms status=
304 bytes=136
2015-02-10T14:30:46.623963+00:00 heroku[router]: at=info method=GET path="/admin
/" host=aqiblog.herokuapp.com request_id=6e2f037e-1156-4ecb-ab9a-c629746701bc fw
d="183.90.125.206" dyno=web.1 connect=3ms service=67ms status=200 bytes=3837
2015-02-10T14:33:37.383948+00:00 heroku[router]: at=info method=GET path="/admin
/auth/user/" host=aqiblog.herokuapp.com request_id=2e7aca9b-bf1a-4bca-a64e-4958c
50d2bc3 fwd="183.90.125.206" dyno=web.1 connect=1ms service=107ms status=200 byt
es=6954
2015-02-10T14:33:37.795450+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/css/base.css" host=aqiblog.herokuapp.com request_id=427f5971-4d88-4876-b
d34-3d61219d0ee0 fwd="183.90.125.206" dyno=web.1 connect=1ms service=3ms status=
304 bytes=136
2015-02-10T14:33:38.115038+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/css/changelists.css" host=aqiblog.herokuapp.com request_id=1011a5b1-f3e3
-4ccd-bb79-decbb9f04bab fwd="183.90.125.206" dyno=web.1 connect=0ms service=1ms
status=304 bytes=136
2015-02-10T14:33:38.144837+00:00 heroku[router]: at=info method=GET path="/admin
/jsi18n/" host=aqiblog.herokuapp.com request_id=713139f7-188f-4dbb-8c06-f187256f
7f69 fwd="183.90.125.206" dyno=web.1 connect=1ms service=45ms status=200 bytes=2
551
2015-02-10T14:33:38.404063+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/js/jquery.init.js" host=aqiblog.herokuapp.com request_id=5135b182-dc2e-4
a74-b8a2-5d6c0ab12db4 fwd="183.90.125.206" dyno=web.1 connect=0ms service=1ms st
atus=304 bytes=136
2015-02-10T14:33:38.400444+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/js/core.js" host=aqiblog.herokuapp.com request_id=de86c5af-1a29-430f-a65
1-dc6cf1fd48bf fwd="183.90.125.206" dyno=web.1 connect=0ms service=1ms status=30
4 bytes=136
2015-02-10T14:33:38.415586+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/js/jquery.min.js" host=aqiblog.herokuapp.com request_id=19c89d3d-5d23-41
09-979e-b8bb3f42199a fwd="183.90.125.206" dyno=web.1 connect=4ms service=2ms sta
tus=304 bytes=136
2015-02-10T14:33:38.408607+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/img/icon_searchbox.png" host=aqiblog.herokuapp.com request_id=c5a70735-1
712-4040-9eb5-6b7dee13abd2 fwd="183.90.125.206" dyno=web.1 connect=0ms service=1
ms status=200 bytes=620
2015-02-10T14:33:38.406036+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/js/admin/RelatedObjectLookups.js" host=aqiblog.herokuapp.com request_id=
893d6f5c-af8b-4532-8aa3-6934250950c4 fwd="183.90.125.206" dyno=web.1 connect=0ms
 service=2ms status=304 bytes=136
2015-02-10T14:33:38.412860+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/js/actions.min.js" host=aqiblog.herokuapp.com request_id=2dcac6b1-bb61-4
ccd-b2ec-25ecacf72228 fwd="183.90.125.206" dyno=web.1 connect=1ms service=4ms st
atus=304 bytes=136
2015-02-10T14:33:38.772975+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/img/changelist-bg.gif" host=aqiblog.herokuapp.com request_id=4e6c781c-37
35-43f8-9e00-6b553737b3a6 fwd="183.90.125.206" dyno=web.1 connect=0ms service=1m
s status=200 bytes=301
2015-02-10T14:33:38.674202+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/img/icon-yes.gif" host=aqiblog.herokuapp.com request_id=e9851dfa-c05f-49
09-a4c4-367907fb285c fwd="183.90.125.206" dyno=web.1 connect=0ms service=1ms sta
tus=200 bytes=551
2015-02-10T14:33:38.777309+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/img/nav-bg.gif" host=aqiblog.herokuapp.com request_id=e1f74192-01f4-4036
-9a9d-79526979186a fwd="183.90.125.206" dyno=web.1 connect=0ms service=2ms statu
s=304 bytes=136
2015-02-10T14:33:38.790954+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/img/nav-bg-selected.gif" host=aqiblog.herokuapp.com request_id=1fa8c87c-
67f7-473d-b783-bdff4120a7ce fwd="183.90.125.206" dyno=web.1 connect=2ms service=
2ms status=200 bytes=517
2015-02-10T14:33:38.784201+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/img/sorting-icons.gif" host=aqiblog.herokuapp.com request_id=c712ebb1-65
e6-45ab-96b5-7a993386ce77 fwd="183.90.125.206" dyno=web.1 connect=0ms service=2m
s status=200 bytes=621
2015-02-10T14:33:43.504537+00:00 heroku[router]: at=info method=GET path="/admin
/" host=aqiblog.herokuapp.com request_id=4de8523a-32a3-4038-baca-1da937d8bcc2 fw
d="183.90.125.206" dyno=web.1 connect=1ms service=63ms status=200 bytes=3837
2015-02-10T14:33:43.831076+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/css/dashboard.css" host=aqiblog.herokuapp.com request_id=e0bb91fd-3202-4
003-adb3-c56c968cace9 fwd="183.90.125.206" dyno=web.1 connect=0ms service=1ms st
atus=304 bytes=136
2015-02-10T14:33:47.175588+00:00 heroku[router]: at=info method=GET path="/admin
/logout/" host=aqiblog.herokuapp.com request_id=9262fa61-6ca5-471d-b640-267022e8
51a7 fwd="183.90.125.206" dyno=web.1 connect=1ms service=76ms status=200 bytes=1
695
2015-02-10T14:33:54.172429+00:00 heroku[router]: at=info method=GET path="/" hos
t=aqiblog.herokuapp.com request_id=8cf14925-254e-464e-9989-97663a447176 fwd="183
.90.125.206" dyno=web.1 connect=0ms service=5ms status=404 bytes=267
2015-02-10T14:57:48.546469+00:00 heroku[api]: Starting process with command `pyt
hon manage.py migrate` by aquietimmanence@gmail.com
2015-02-10T14:57:54.603274+00:00 heroku[run.5781]: Awaiting client
2015-02-10T14:57:54.648369+00:00 heroku[run.5781]: Starting process with command
 `python manage.py migrate`
2015-02-10T14:57:54.901926+00:00 heroku[run.5781]: State changed from starting t
o up
2015-02-10T14:57:57.659853+00:00 heroku[run.5781]: State changed from up to comp
lete
2015-02-10T14:57:57.650205+00:00 heroku[run.5781]: Process exited with status 0
2015-02-10T15:35:07.305786+00:00 heroku[web.1]: Stopping all processes with SIGT
ERM
2015-02-10T15:35:08.786505+00:00 heroku[web.1]: Process exited with status 143
2015-02-10T15:35:05.251964+00:00 heroku[web.1]: Idling
2015-02-10T15:35:05.253030+00:00 heroku[web.1]: State changed from up to down
2015-02-10T15:48:14.796557+00:00 heroku[web.1]: Unidling
2015-02-10T15:48:20.976179+00:00 app[web.1]: serving on http://0.0.0.0:22300
2015-02-10T15:48:14.800364+00:00 heroku[web.1]: State changed from down to start
ing
2015-02-10T15:48:19.187658+00:00 heroku[web.1]: Starting process with command `w
aitress-serve --port=22300 mysite.wsgi:application`
2015-02-10T15:48:21.486158+00:00 heroku[web.1]: State changed from starting to u
p
2015-02-10T15:48:31.912164+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/css/base.css" host=aqiblog.herokuapp.com request_id=8db52772-ce7d-4c5d-a
b49-07cbe01ebaf7 fwd="183.90.125.206" dyno=web.1 connect=1ms service=2ms status=
200 bytes=14265
2015-02-10T15:48:22.898514+00:00 heroku[router]: at=info method=GET path="/" hos
t=aqiblog.herokuapp.com request_id=df78cf63-b28a-4986-947b-82b7229b6c22 fwd="183
.90.125.206" dyno=web.1 connect=1ms service=22ms status=404 bytes=267
2015-02-10T15:48:32.904690+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/css/login.css" host=aqiblog.herokuapp.com request_id=f01a7d1e-d3da-4ce2-
a596-49c502c148a9 fwd="183.90.125.206" dyno=web.1 connect=6ms service=6ms status
=200 bytes=1208
2015-02-10T15:48:31.526354+00:00 heroku[router]: at=info method=GET path="/admin
/login/?next=/admin/" host=aqiblog.herokuapp.com request_id=28cd2f09-49fe-4327-a
b6c-4fadd62b32db fwd="183.90.125.206" dyno=web.1 connect=2ms service=32ms status
=200 bytes=2368
2015-02-10T15:48:33.516041+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/img/nav-bg.gif" host=aqiblog.herokuapp.com request_id=ad4a834a-814a-4a95
-926f-9356f0ee8939 fwd="183.90.125.206" dyno=web.1 connect=1ms service=3ms statu
s=200 bytes=517
2015-02-10T15:48:31.127574+00:00 heroku[router]: at=info method=GET path="/admin
/" host=aqiblog.herokuapp.com request_id=1a5c7e5a-e4b7-4a9d-a141-df959928fe81 fw
d="183.90.125.206" dyno=web.1 connect=1ms service=16ms status=302 bytes=390
2015-02-10T15:49:01.840359+00:00 heroku[router]: at=info method=POST path="/admi
n/login/?next=/admin/" host=aqiblog.herokuapp.com request_id=4287d109-c80e-4e43-
acc1-b047f63af3bc fwd="183.90.125.206" dyno=web.1 connect=2ms service=140ms stat
us=200 bytes=2540
2015-02-10T15:49:02.187422+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/img/icon_error.gif" host=aqiblog.herokuapp.com request_id=feb59db0-4c11-
495b-80f2-a5923fc73c6f fwd="183.90.125.206" dyno=web.1 connect=2ms service=3ms s
tatus=200 bytes=571
2015-02-10T15:49:21.789377+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/img/nav-bg-reverse.gif" host=aqiblog.herokuapp.com request_id=36deb932-f
4b7-433b-99dc-5926493a7c89 fwd="183.90.125.206" dyno=web.1 connect=2ms service=3
ms status=200 bytes=430
2015-02-10T15:49:22.319427+00:00 heroku[router]: at=info method=POST path="/admi
n/login/?next=/admin/" host=aqiblog.herokuapp.com request_id=5fdd060f-1513-4816-
a6eb-203c999af731 fwd="183.90.125.206" dyno=web.1 connect=3ms service=134ms stat
us=200 bytes=2540
2015-02-10T15:49:56.826400+00:00 heroku[router]: at=info method=POST path="/admi
n/login/?next=/admin/" host=aqiblog.herokuapp.com request_id=f3d1e006-6e9c-436b-
bf1a-c4d4f05532d4 fwd="183.90.125.206" dyno=web.1 connect=10ms service=187ms sta
tus=200 bytes=2540
2015-0
2-10T15:49:57.955395+00:00 heroku[router]: at=info method=GET path="/static/admi
n/css/login.css" host=aqiblog.herokuapp.com request_id=a918b235-0698-4ce4-80d0-a
96d8dfc0610 fwd="183.90.125.206" dyno=web.1 connect=1ms service=6ms status=304 b
ytes=136
2015-02-10T15:49:59.906654+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/css/base.css" host=aqiblog.herokuapp.com request_id=15773995-4c99-459a-9
029-ee456371f894 fwd="183.90.125.206" dyno=web.1 connect=0ms service=1ms status=
304 bytes=136
2015-02-10T15:50:01.261517+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/img/icon_error.gif" host=aqiblog.herokuapp.com request_id=3b313279-e294-
42c0-8aa5-f41debcb637e fwd="183.90.125.206" dyno=web.1 connect=4ms service=5ms s
tatus=304 bytes=136
2015-02-10T15:50:05.242912+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/img/nav-bg.gif" host=aqiblog.herokuapp.com request_id=6a0162e3-ec3b-445c
-b8df-82d5ac6febb2 fwd="183.90.125.206" dyno=web.1 connect=1ms service=2ms statu
s=304 bytes=136
2015-02-10T15:57:25.175840+00:00 heroku[router]: at=info method=GET path="/" hos
t=aqiblog.herokuapp.com request_id=0d15d2cb-81e6-4482-bb62-b6182a994ad7 fwd="183
.90.125.206" dyno=web.1 connect=1ms service=5ms status=404 bytes=267
2015-02-10T15:59:35.740276+00:00 heroku[router]: at=info method=GET path="/" hos
t=aqiblog.herokuapp.com request_id=7b4581c2-94d7-4835-a46c-632690169036 fwd="180
.255.248.125" dyno=web.1 connect=1ms service=5ms status=404 bytes=267
2015-02-10T15:59:36.759656+00:00 heroku[router]: at=info method=GET path="/favic
on.ico" host=aqiblog.herokuapp.com request_id=2f3cc9e1-c086-4725-b9ab-1ec6973c41
16 fwd="180.255.248.125" dyno=web.1 connect=1ms service=5ms status=404 bytes=278

2015-02-10T17:00:33.167613+00:00 heroku[web.1]: Idling
2015-02-10T17:00:33.168670+00:00 heroku[web.1]: State changed from up to down
2015-02-10T17:00:36.185466+00:00 heroku[web.1]: Stopping all processes with SIGT
ERM
2015-02-10T17:00:37.952348+00:00 heroku[web.1]: Process exited with status 143
2015-02-10T17:34:28.848841+00:00 heroku[web.1]: Unidling
2015-02-10T17:34:28.849165+00:00 heroku[web.1]: State changed from down to start
ing
2015-02-10T17:34:36.106173+00:00 heroku[web.1]: Starting process with command `w
aitress-serve --port=31126 mysite.wsgi:application`
2015-02-10T17:34:38.613422+00:00 app[web.1]: serving on http://0.0.0.0:31126
2015-02-10T17:34:39.197559+00:00 heroku[web.1]: State changed from starting to u
p
2015-02-10T17:34:40.974208+00:00 heroku[router]: at=info method=GET path="/admin
" host=aqiblog.herokuapp.com request_id=42a56ba0-c220-4c9c-916f-0eede44bfee9 fwd
="79.199.237.241" dyno=web.1 connect=3ms service=22ms status=301 bytes=257
2015-02-10T17:34:41.125316+00:00 heroku[router]: at=info method=GET path="/admin
/" host=aqiblog.herokuapp.com request_id=3388a9c4-f5ee-40a5-9ac8-a05d7568854e fw
d="79.199.237.241" dyno=web.1 connect=3ms service=20ms status=302 bytes=390
2015-02-10T17:34:41.293835+00:00 heroku[router]: at=info method=GET path="/admin
/login/?next=/admin/" host=aqiblog.herokuapp.com request_id=3ae35f86-8510-4cf3-a
0e5-f2a0ce41248b fwd="79.199.237.241" dyno=web.1 connect=2ms service=43ms status
=200 bytes=2368
2015-02-10T17:34:41.985024+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/css/base.css" host=aqiblog.herokuapp.com request_id=19153867-5c26-41ca-a
8aa-d62e8094a02b fwd="79.199.237.241" dyno=web.1 connect=3ms service=5ms status=
200 bytes=14265
2015-02-10T17:34:42.139780+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/css/login.css" host=aqiblog.herokuapp.com request_id=7b798b7b-7850-43b4-
927b-2343eacc5582 fwd="79.199.237.241" dyno=web.1 connect=5ms service=5ms status
=200 bytes=1208
2015-02-10T17:34:43.024133+00:00 heroku[router]: at=info method=GET path="/stati
c/admin/img/nav-bg.gif" host=aqiblog.herokuapp.com request_id=20fa5217-01eb-4615
-bd4f-b53aaee0421c fwd="79.199.237.241" dyno=web.1 connect=3ms service=5ms statu
s=200 bytes=517
2015-02-10T17:34:44.289787+00:00 heroku[router]: at=info method=GET path="/favic
on.ico" host=aqiblog.herokuapp.com request_id=4bfc9795-d61c-402c-afd5-08bfe0564b
38 fwd="79.199.237.241" dyno=web.1 connect=4ms service=11ms status=404 bytes=278

2015-02-10T17:34:44.446558+00:00 heroku[router]: at=info method=GET path="/favic
on.ico" host=aqiblog.herokuapp.com request_id=131a1b9d-cac0-4410-ae02-0ab562e6b2
2b fwd="79.199.237.241" dyno=web.1 connect=2ms service=7ms status=404 bytes=278
2015-02-10T17:35:08.338710+00:00 heroku[router]: at=info method=GET path="/" hos
t=aqiblog.herokuapp.com request_id=4fd6af83-32f4-4ba2-8117-1e0914ac8882 fwd="79.
199.237.241" dyno=web.1 connect=4ms service=9ms status=404 bytes=267
2015-02-10T18:41:59.962983+00:00 heroku[web.1]: Idling
2015-02-10T18:41:59.963483+00:00 heroku[web.1]: State changed from up to down
2015-02-10T18:42:04.360383+00:00 heroku[web.1]: Stopping all processes with SIGT
ERM
2015-02-10T18:42:06.591219+00:00 heroku[web.1]: Process exited with status 143

另外,我在 Windows 8 上工作,我对使用命令行还是陌生的,所以如果这需要任何命令行故障排除,如果你能给我 Windows 命令,我将不胜感激(虽然我会如果你给我 Unix 命令,我很乐意搜索 Windows 等价物)

最佳答案

您能否确认您正在访问的 URL 与运行以下命令时输出的 URL 相同:

heroku info -s | grep web_url | cut -d= -f2

此外,如果您运行以下命令,您是否看到任何异常情况?

heroku logs

关于django - 在 heroku 上部署 django 应用程序 - 在服务器上找不到请求的 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28434920/

相关文章:

python - 在 GeoDjango 中查找一组多边形内的模型

python - 如何在 Django 中保持导入整洁?

python - 使用 Heroku 在 Django 应用程序中部署时出现错误

ruby-on-rails - 将rails应用程序部署到heroku,sendgrid电子邮件链接不可行

ssl - 将 ssl 证书上传到 heroku

python - 在 PyMongo 中使用 IS NULL

python - 首次部署时的 Djangosyncdb

hadoop - 如何将 Spark ML Lib 模型保存/导出到 PMML?

svn - 用于 Web 开发的 Subversion 部署工作流

c# - 多服务器部署的 ASP.net 解决方案注意事项