tomcat5.5部署一工程,localhost能访问,而用127.0.0.1和本地ip不能访问,报404。

解决方案 »

  1.   

    能说清楚点吗?为什么用localhost可以的
      

  2.   

    在host文件里 添加一行 
    127.0.0.1     localhost  试试看
      

  3.   

    # Copyright (c) 1993-2009 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # For example:
    #
    #      102.54.94.97     rhino.acme.com          # source server
    #       38.25.63.10     x.acme.com              # x client host# localhost name resolution is handled within DNS itself.
    #127.0.0.1       localhost
    #::1             localhost已经有了
      

  4.   

    用http://192.168.1.249:8080/ACG/ 也不行
      

  5.   

    #127.0.0.1 localhost 
    你注释掉了啊  把#号去掉
      

  6.   

    修改了,没用。http://127.0.0.1能访问IIS的默认网页 ping也是行的。就是报404,是不是tomcat问题
      

  7.   

    http://127.0.0.1:8080/ 
    结果:
    Your server is up and running!怎么就是不能访问到工程
      

  8.   

    #::1localhost
    把这个删掉
    再试
      

  9.   

    ping 一下localhost 看解析出来的地址是什么 正常的话 应该是127.0.0.1
      

  10.   

    C:\Users\Administrator>ping localhost正在 Ping PC-20101110LIXL [::1] 具有 32 字节的数据:
    来自 ::1 的回复: 时间<1ms
    来自 ::1 的回复: 时间<1ms
    来自 ::1 的回复: 时间<1ms
    来自 ::1 的回复: 时间<1ms::1 的 Ping 统计信息:
        数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢
    往返行程的估计时间(以毫秒为单位):
        最短 = 0ms,最长 = 0ms,平均 = 0ms