在服务器上部署tomcat 通过域名怎么访问不了 ip不能访问 ip自动拦截的

在服务器上部署tomcat 通过域名怎么访问不了 ip不能访问 ip自动拦截的

tomcat禁止ip直接访问
设置Tomcat不允许通过IP直接访问
更改host节点后虚拟目录设置失效
发现内部ip泄露模式
1、若公布于外网的服务器IP地址未备案,就有可能被工信部查封。这样备案的域名也会无法访问。
2、如果AppScan通过ip访问扫描,会有“发现内部ip泄露模式”的低级别的警告
安全风险

  • 可能会收集有关Web 应用程序的敏感信息,如用户名、密码、机器名和/或敏感文件位置 若是tomcat服务,可通过简单的配置屏蔽IP地址直接访问。 比如,有服务器,IP地址是 192.168.1.2 ,相应域名是 www.myTest.com

打开 conf/server.xml文件
找到 Engine节点作如下

<!--For clustering, please take a look at documentation at:
/docs/cluster-howto.html (simple how to)
/docs/config/cluster.html (reference documentation) -->
<!--

-->

<!-- Use the LockOutRealm to prevent attempts to guess user passwords
via a brute-force attack -->

<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
resourceName="UserDatabase"/>

<!-- 2、配置允许域名访问-->
unpackWARs="true" autoDeploy="false">

<!-- 3、配置禁止ip地址访问-->
unpackWARs="true" autoDeploy="false">

你的服务器是Linux系统还是windows系统

  1. 检查程序是否正常运行
  2. 检查防火墙是否开放了程序端口
  3. 检查域名备案