linux - localhost 重定向到 http ://www. localhost:8000/

标签 linux firefox google-chrome localhost hosts

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

当使用 ./manage.py runserver 0.0.0.0:8000 运行我的 django 服务器时,当我转到 chrome 或 firefox 并输入 localhost:8000 chrome 重定向到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

最佳答案

添加这一行问题就解决了:

::1     localhost.localdomain   localhost arch

/etc/hosts 文件中。

关于linux - localhost 重定向到 http ://www. localhost:8000/,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10742469/

相关文章:

html - css 表格中心在 Firefox 中不工作

firefox - 编辑现有的 Firefox 附加组件

google-chrome - 在 Chrome chrome 扩展 ://page 中使用 eval()

javascript - 使用 PageY 和 ClientY 鼠标位置的差异结果

c - Linux在运行时写入进程自己的可执行文件

java - 在 § 之前附加一个特殊字符

linux - SELINUX 阻止 php-fpm 和 nginx 一起工作?

linux - Shell 脚本 -path 和运行命令在一行中

java - 使用自签名 SSL 证书时,无法使用远程 Selenium WebDriver + Jenkins + FireFox 在 Java 上运行自动测试

javascript - WebRTC 流式传输不适用于某些浏览器组合