如何在 Tomcat 文件中将 localhost:8084 重置为 http://127.0.0.1:8084 ?

发布于 2024-12-26 13:18:01 字数 382 浏览 0 评论 0原文

我和其他人一起在打包安装中使用 NetBeans 加载 Tomcat 7.0.22.0 时遇到了一些问题。这似乎是某些计算机的问题,而不是其他计算机的问题。更不用说我遇到的其他小问题了,浏览器无法加载,

http://localhost:8084

所以我粘贴了...

http://127.0.0.1:8084

并且它起作用了。第一个地址(使用本地主机)确实可以在我的另一台计算机和我们班的其他一些计算机上工作,但有些人一直在与此作斗争。我很幸运地找到了这个补丁。其他问题(密码和端口号)似乎也与可能在 Windows 7 Professional 64 上加载一致,或者这可能只是偶然。任何想法都会有很大的帮助。

I had some issues along with others, loading Tomcat 7.0.22.0 with NetBeans on packaged instal. This looked to be an issue with some computers and not others. Not to mention other little issues I got past, the browser would not load with

http://localhost:8084

So I pasted in...

http://127.0.0.1:8084

And it worked. The first address (with localhost) does work on my other computer and some others in our class, but a few have been battling with this. I figured out the patch by luck. The other problems (password and port #'s) also seemed to be consistent with possibly loading on a Windows 7 Professional 64, or this could be just chance. Any ideas would be a big help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

回眸一笑 2025-01-02 13:18:01

也许您的主机文件中缺少一个条目。本地主机几乎总是 127.0.0.1 100% 同义

Perhaps you are missing an entry in your hosts file. Localhost is almost always 100% synonymous with 127.0.0.1

梦里梦着梦中梦 2025-01-02 13:18:01

当计算机尝试查找 localhost 时,通常会在主机文件中找到 localhost(在 Windows 上通常位于 C:\Windows\System32\Drivers\etc\hosts 中)。如果计算机无法连接到本地主机,通常是因为该文件丢失或配置错误。

也就是说,我看到一些计算机在使用 ipv6 localhost 线路(::1)时遇到问题。

基本上,它似乎(在某些计算机上)使启用 ipv6 的程序(如 Internet Explorer)使用 ipv6,而未启用的程序则使用 ipv4,这使得他们不沟通。我无法确切地弄清楚为什么某些计算机似乎存在此问题,但删除该

::1 localhost 

行并添加(如果不存在)

127.0.0.1 localhost

通常可以解决问题。

localhost is (usually) found in the hosts file (on Windows usually found in C:\Windows\System32\Drivers\etc\hosts) when the computer tries to look it up. If the computer can't connect to localhost, it's usually because it's missing or configured wrong in that file.

That said, I've seen some computers having trouble with the ipv6 localhost line (the ::1)

Basically it seems to (on some computers) make ipv6 enabled programs like Internet Explorer use ipv6 while the non enabled ones use ipv4, which makes them not communicate. I've not been able to figure out exactly why some computers seem to have this problem, but removing the

::1 localhost 

line and adding (if it does not exist) a

127.0.0.1 localhost

usually fixes the problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文