在Ubuntu 18.04上,我无法使用IP地址从浏览器访问Tomcat

时间:2018-09-28 18:17:25

标签: linux tomcat ubuntu-18.04

我已经在Ubuntu 18.04(VM)上安装了Tomcat 9。我无法通过浏览器(或curl)使用IP地址访问tomcat

在VM上, tomcat正在运行,并且Forbidden You don't have permission to access /test/login/google/callback on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. 有效。

enter image description here

但是在外部却没有。

curl http://1.2.3.4:8080

Tomcat的server.xml

l-OSX: hal$ curl https://10.51.253.163:8080 -v
* Rebuilt URL to: https://10.51.253.163:8080/
*   Trying 10.51.253.163...
* connect to 10.51.253.163 port 8080 failed: Operation timed out
* Failed to connect to 10.51.253.163 port 8080: Operation timed out

UFW未激活

<Engine name="Catalina" defaultHost="10.51.253.163">
  ...
  <Host name="10.51.253.163" appBase="webapps"
        unpackWARs="true" autoDeploy="true">

Ping到VM正常

sudo ufw status verbose`
Status: inactive`

对此表示感谢!

1 个答案:

答案 0 :(得分:-1)

经过IT支持团队的研究和帮助,我能够通过以下方式解决此问题:

  • VM>管理安全性
  • 添加安全规则
  • 允许端口:8080,协议:TCP

能够从浏览器访问Tomcat。

enter image description here

相关问题