localhost
localhost在计算机网络中,localhost(意为“本地主机”,指“这台计算机”)是给回路网络接口(loopback)的一个标准主机名,相对应的IP地址为127.0.0.1(IPv4)和[::1](IPv6)。
目录
1介绍
在可用其他方式使用计算机主机名称的地方,可以指定主机为localhost。例如,将web服务器上安装的web浏览器指向http://localhost,将会显示运行这个浏览器的计算机上所服务的网站的主页,但是只有当web服务器配置至服务回路接口时才能显示。
localhost 指你所在的计算机本身。
windows修改localhost指向
2设置
windows中设置:
两种方法找到localhost设置:
1、运行 drivers 打开etc文件下hosts 就看到了127.0.0.1 localhost
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 (这里不让显示) # source server
# 38.25.63.10 (这里不让显示) # x client host
127.0.0.1localhost
最下面的:
127.0.0.1 localhost,这两个参数你可以随意改。格式是IP空格域名
localhost login 是什么意思?