2
votes

I kn ow this has been asked other times but i followed every advice without success..

I intalled Tomcat 8.5.5 in my AWS EC2 instance with Ubuntu. Tomcat is up and running (i see the splash page at http://mywebsite.com:8080

When I try to go inside the App Manager i get an HTTP Status 404 - /manager/html (manager app is present in /webapps folder)

I tried to edit the server.xml file adding

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

Then i updated the context.xml in this way, adding my ip to the Connector

<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>

I obviously add the users in 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"/>

Restarted tomcat... but nothing...

1

1 Answers

0
votes

You also have to add your IP and 'useIPVHost' to the Connector element. Do not add another Connector element, but edit the existing one:

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

You don't have to add the MemoryRealm as you did, it should work with UserDatabaserealm as long as you stick to authenticate with username/password as defined in your tomcat-users.xml

For a more complete description see my answer to a similar question