1

我的 google chrome 和 firefox 有问题(我仅有的 2 个浏览器)

当运行我的 django 服务器时./manage.py runserver 0.0.0.0:8000,当我转到 chrome 或 firefox 并输入localhost:8000chrome 时重定向到http://www.localhost:8000/

你知道是什么问题吗??

我的主机文件是:

#
# /etc/hosts: static lookup table for host names
#

#<ip-address>   <hostname.domain.org>   <hostname>
127.0.0.1   localhost.localdomain   localhost arch
127.0.0.1   example.com
4

2 回答 2

2

那么问题解决了添加这一行:

::1     localhost.localdomain   localhost arch

/etc/hosts文件中。

于 2012-06-17T03:17:01.803 回答
0

设置PREPEND_WWW = False并清除浏览器缓存后,它可以在 Firefox 和 Chromium 中运行。

于 2013-09-18T11:52:15.323 回答