WebApp可通过localhost访问,但不能通过127.0.0.1访问 [英] WebApp accessible via localhost but not 127.0.0.1

查看:511
本文介绍了WebApp可通过localhost访问,但不能通过127.0.0.1访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的机器(Win7 pro X64)上使用Maven在Jetty上运行一个Web应用程序,并且遇到了一些奇怪的问题:

i'm running a webapp on Jetty with Maven on my machine (Win7 pro X64) and i'm experiencing some weird problems:

  1. 当我尝试在浏览器中打开它时-可通过localhost而不是127.0.0.1或我的本地地址(192.168.0.14)访问.
  2. 当我本地网络中的其他人尝试访问该应用程序时,他可以通过我的计算机名而不是我的本地地址来访问它.
  1. when i try to open it on my browser - it's accessible via localhost but not 127.0.0.1 or my local address (192.168.0.14).
  2. when someone else from my local network tries to access the app he can do it via my computer name but not via my local address.

注意:

  1. ping适用于localhost和127.0.0.1.另外,我可以使用telnet访问127.0.0.1(80).
  2. Windows防火墙已关闭(已停止服务)
  3. 主机文件中未定义任何内容
  4. 清洁DNSARP茶歇无济于事
  5. 在网络中的其他计算机上,该应用程序运行正常,我可以通过其ip访问它.我们都共享相同的pom.xml.
  6. 错误说-链接似乎是
  1. ping works for localhost and 127.0.0.1. also, i can access 127.0.0.1 (80) with telnet.
  2. windows firewall is off (stopped the service)
  3. nothing defined in hosts file
  4. cleaning DNS and ARP chache didn't help
  5. on other computers in the network the app works fine and i can access it via their ip. we all share the same pom.xml.
  6. error says - "link appears to be

请帮助我找出到底是什么问题

please help me find out what the hell can be the problem

谢谢...

推荐答案

一个晚上的尝试后,我认为我发现了问题- Skype

after a looong evening of trying pretty much everything i think i found the problem - Skype!

在8080年成功运行码头之后,我咨询了一位朋友,他告诉了我有关Skype的问题.关闭skype后,码头在端口80上也可以完美运行:)

after running jetty successfully on 8080 i consulted a friend and he told me about the skype issue. after shutting down skype, jetty runs perfectly on port 80 as well :)

在快速搜索后,我发现了这一点-

after a quick search i found this - http://www.mydigitallife.info/disable-skype-from-using-opening-and-listening-on-port-80-and-443-on-local-computer/

注意:出于某种原因,在这种情况下,Jetty不会抛出像服务器那样的异常

NOTE: for some reason Jetty isn't throwing an exception like a server should in this situation

这篇关于WebApp可通过localhost访问,但不能通过127.0.0.1访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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