Ubuntu 12.04 服务器上的 Tomcat 7 无法在浏览器上运行

Ubuntu 12.04 服务器上的 Tomcat 7 无法在浏览器上运行

我是 Linux 新手。我已使用 Ubuntu 12.04 LTS 32 位设置了我的 VPS。我已成功安装了 Tomcat 并成功启动了它/usr/share/apache-tomcat-7.0.34/bin/catalina.sh run

但是当我尝试使用 [MyServerIP]:8080 访问默认 tomcat 页面时,无法连接。我做错了什么吗?

更新

我重新启动了,这就是日志中的全部内容。

INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/i386:/lib:/usr/lib
Jan 02, 2013 8:59:53 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jan 02, 2013 8:59:53 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Jan 02, 2013 8:59:53 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 739 ms
Jan 02, 2013 8:59:53 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jan 02, 2013 8:59:53 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.34
Jan 02, 2013 8:59:53 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.34/webapps/ROOT
Jan 02, 2013 8:59:53 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.34/webapps/docs
Jan 02, 2013 8:59:53 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-     7.0.34/webapps/examples
Jan 02, 2013 8:59:53 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.34/webapps/host- manager
Jan 02, 2013 8:59:53 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.34/webapps/manager
Jan 02, 2013 8:59:53 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Jan 02, 2013 8:59:53 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Jan 02, 2013 8:59:53 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 870 ms 

看起来好像永远都连接不上

答案1

感谢 PratapSingh 和 Eric DANNIELOU。你们说得对。这是防火墙的问题。端口 8080 被阻止了。添加了此行:-A INPUT -p tcp --dport 8080 -j ACCEPT。现在它工作正常。再次感谢。

相关内容