2016-09-09 82 views
1

我KN OW这个已经被问其他时间,但我也跟着没有成功每建议..TOMCAT - 无法访问管理器应用

我在使用Ubuntu AWS EC2实例里安装Tomcat的8.5.5。 Tomcat是启动和运行(我看到在http://mywebsite.com:8080

醒目网页当我尝试去应用程序管理器我得到一个HTTP状态404内 - /经理/ HTML(经理的应用程序存在于/ webapps中的文件夹)

我试图编辑server.xml文件中添加

<Realm className="org.apache.catalina.realm.MemoryRealm" /> 

然后我更新这样context.xml中,加入我的IP的连接器

<Context antiResourceLocking="false" privileged="true" > 
    <Valve className="org.apache.catalina.valves.RemoteAddrValve" 
     allow=2\.228\.86\.2|"127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" /> 
</Context> 

我明明添加了用户的tomcat-users.xml中

<role rolename="manager-gui"/> 
<role rolename="admin-gui"> 
<role rolename="manager-script"/> 
<user username="system" password="xxxxxxxx" roles="manager-gui,admin-gui"/> 
<user username="xxxxxxx" password="xxxxxxxx" roles="manager-script"/> 

重启动tomcat的...但没有...

回答

0

你也有你的IP和 'useIPVHost' 添加到Connector元素。不要添加其他连接器元素,但编辑现有的一个:

<Connector port="9009" protocol="AJP/1.3" redirectPort="9443" 
     address="2.228.86.2" useIPVHosts="true" /> 

您不必添加MemoryRealm像你一样,它应该是UserDatabaseRealm,只要你坚持工作,用户名/密码进行身份验证定义在你的tomcat-users.xml中

欲了解更多的完整说明,请参阅我的answer to a similar question