Django w/ Apache:错误:无法分配该 IP 地址
让我的服务器与 Apache 一起工作,运行它,一切都很顺利。将 html 文件添加到模板中,并设置views.py 和 urls.py 以在正确的 url 处呈现它。通过 git 同步所有内容,但是当我发出 sudo python manage.py runserver 123.456.789.000:80
(填写我的 IP,在端口 80 上运行)时,我得到 Error: That IP地址无法分配给。
令人费解,因为我刚刚在该 IP 地址成功运行了服务器...
Thoguhts?
got my server working with Apache, ran it and everything was peachy. Added an html file to the templates and set a the views.py and urls.py to render it at the correct url. Synced everything via git, but when I issue sudo python manage.py runserver 123.456.789.000:80
(with my IP filled in, to run on port 80), I get Error: That IP address can't be assigned-to.
Puzzling, because I just ran the server successfully at that IP address...
Thoguhts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果 Apache 在端口 80 上运行(默认情况下是这样),那么您当然也无法在该地址运行
runserver
。虽然我不知道你为什么想要这么做。If you've got Apache running on port 80, as it is by default, then of course you can't run
runserver
at that address as well. Although I don't know why you'd want to.