2016-04-27 111 views
0

我已经安装在Ubuntu 15.10 tomcat8经理桂和我平时的欢迎画面,当我去:无法访问tomcat8

http://myhost:8082/ 

(我重新配置的端口8082在server.xml中)。

但我不能在访问管理器GUI:

http://myhost:8082/manager/html 

我试图在/etc/tomcat8/tomcat-users.xml文件,然后tomcat8与重新启动以下:

sudo /etc/init.d/tomcat8 restart 

下面是我曾尝试编辑:

1)

<role rolename="manager-gui"/> 
<user username="admin" password="12345" roles="manager-gui"/> 

2)

<user username="user" password="password" roles="admin-gui,manager-gui" /> 

我发现了其他SO帖子和博客描述每一个新的方式,使配置的用户/角色,但他们没有工作。相反,我不断收到:

enter image description here

cat catalina.out 


INFO: Starting service Catalina 
Apr 27, 2016 10:36:32 PM org.apache.catalina.core.StandardEngine startInternal 
INFO: Starting Servlet Engine: Apache Tomcat/8.0.26 (Ubuntu) 
Apr 27, 2016 10:36:32 PM org.apache.catalina.startup.HostConfig deployDirectory 
INFO: Deploying web application directory /var/lib/tomcat8/webapps/ROOT 
Apr 27, 2016 10:36:32 PM org.apache.catalina.core.StandardContext setPath 
WARNING: A context path must either be an empty string or start with a '/' and do not end with a '/'. The path [/] does not meet these criteria and has been changed to [] 
Apr 27, 2016 10:36:34 PM org.apache.jasper.servlet.TldScanner scanJars 
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. 
Apr 27, 2016 10:37:36 PM org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom 
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [61,847] milliseconds. 
Apr 27, 2016 10:37:36 PM org.apache.catalina.startup.HostConfig deployDirectory 
INFO: Deployment of web application directory /var/lib/tomcat8/webapps/ROOT has finished in 63,602 ms 
Apr 27, 2016 10:37:36 PM org.apache.coyote.AbstractProtocol start 
INFO: Starting ProtocolHandler ["http-nio-8082"] 
Apr 27, 2016 10:37:36 PM org.apache.catalina.startup.Catalina start 
INFO: Server startup in 63722 ms 

回答

1

看起来你没有安装在所有的管理器应用。它没有默认安装在Ubuntu的Tomcat上。在Ubuntu 14.04中有一个包tomcat7-admin - 我假设你可以在15.10中找到tomcat8-admin - 检查aptitude search tomcat的结果并验证可用包,然后sudo aptitude install tomcat8-admin。

当您安装它时,请记得妥善保护它 - 您不应该在生产系统中提供它,而不必明确限制谁可以访问它(不仅仅是用户名/密码)