如何在 Tomcat 文件中将 localhost:8084 重置为 http://127.0.0.1:8084 ?
我和其他人一起在打包安装中使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
也许您的主机文件中缺少一个条目。本地主机几乎总是 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
当计算机尝试查找 localhost 时,通常会在主机文件中找到 localhost(在 Windows 上通常位于 C:\Windows\System32\Drivers\etc\hosts 中)。如果计算机无法连接到本地主机,通常是因为该文件丢失或配置错误。
也就是说,我看到一些计算机在使用 ipv6 localhost 线路(::1)时遇到问题。
基本上,它似乎(在某些计算机上)使启用 ipv6 的程序(如 Internet Explorer)使用 ipv6,而未启用的程序则使用 ipv4,这使得他们不沟通。我无法确切地弄清楚为什么某些计算机似乎存在此问题,但删除该
行并添加(如果不存在)
通常可以解决问题。
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
line and adding (if it does not exist) a
usually fixes the problem.
如果你懒的话,这里是最好的选择
http://go.microsoft.com/?linkid=9668866
参考:- http://support.microsoft.com/kb/972034
if you lazy here is best option
http://go.microsoft.com/?linkid=9668866
reference:- http://support.microsoft.com/kb/972034