localhost:8080 是什么意思? [英] What does localhost:8080 mean?

查看:531
本文介绍了localhost:8080 是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

localhost/weblocalhost:8080/web 有什么区别?

推荐答案

TCP/IP 连接总是连接到一个 IP 地址(您可以将 IP 地址视为某台计算机的地址,即使它是并非总是如此)该地址上的特定(逻辑而非物理)端口.

A TCP/IP connection is always made to an IP address (you can think of an IP-address as the address of a certain computer, even if that is not always the case) and a specific (logical, not physical) port on that address.

通常一个端口与目标计算机上的特定进程或服务"耦合.某些端口号是标准化,例如 80 用于 http,25 用于 smtp 等等.由于这种标准化,您通常不需要将端口号放入您的网络地址中.

Usually one port is coupled to a specific process or "service" on the target computer. Some port numbers are standardized, like 80 for http, 25 for smtp and so on. Because of that standardization you usually don't need to put port numbers into your web adresses.

因此,如果您说诸如 http://www.stackoverflow.com 之类的内容,stackoverflow.com"部分将解析为 IP地址(在我的例子中是 64.34.119.12)并且因为我的浏览器知道标准,所以它尝试连接到该地址上的端口 80.因此,这与 http://www.stackoverflow.com:80 相同.

So if you say something like http://www.stackoverflow.com, the part "stackoverflow.com" resolves to an IP address (in my case 64.34.119.12) and because my browser knows the standard it tries to connect to port 80 on that address. Thus this is the same as http://www.stackoverflow.com:80.

但是没有什么可以阻止进程侦听另一个端口上的 http 请求,例如 12434、4711 或 8080.通常(如您的情况)这用于调试目的,以免与另一个进程(例如 IIS)混合已经在同一台机器上侦听端口 80.

But there is nothing that stops a process to listen for http requests on another port, like 12434, 4711 or 8080. Usually (as in your case) this is used for debugging purposes to not intermingle with another process (like IIS) already listening to port 80 on the same machine.

这篇关于localhost:8080 是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆