且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

"localhost",主机和端口的全部含义是什么?

更新时间:2022-06-27 02:40:32

在计算机网络中,localhost(意为此计算机")是为回送网络接口地址指定的标准主机名.

In computer networking, localhost (meaning "this computer") is the standard hostname given to the address of the loopback network interface.

Localhost始终将IPv4中的回送IP地址转换为127.0.0.1.

Localhost always translates to the loopback IP address 127.0.0.1 in IPv4.

它也用于代替计算机的主机名.例如,将安装在运行HTTP服务器的系统上的Web浏览器定向到 http://localhost ,将显示本地计算机的主页.网站.

It is also used instead of the hostname of a computer. For example, directing a web browser installed on a system running an HTTP server to http://localhost will display the home page of the local web site.

来源:***-Localhost .

:80部分是TCP端口.您可以将这些端口视为特定IP地址上的通信终结点(对于localhost-127.0.0.1). IANA 负责维护特定服务的标准端口号的正式分配.端口80恰好是 HTTP 的标准端口.

The :80 part is the TCP port. You can consider these ports as communications endpoints on a particular IP address (in the case of localhost - 127.0.0.1). The IANA is responsible for maintaining the official assignments of standard port numbers for specific services. Port 80 happens to be the standard port for HTTP.