tomcat部署后,通过IP不能访问的情况

问题:
部署了TOMCAT后,在本地通过IP访问不了服务

分析:
通过域名却可以访问
比如:
      <Host name="test.com"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">
        <Context path="/" docBase="xxx" reloadable="true" >
        </Context>
      </Host>
      get test.com/index.jps

解决:
      把test.com换成IP,如下(具体原因待后续分析)
      <Host name="xxx.xxx.xxx.xxx"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">
        <Context path="/" docBase="xxx" reloadable="true" >
        </Context>
      </Host>

猜你喜欢

转载自shuhucy.iteye.com/blog/2299021