I have installed tomcat 9 on a remote sever and after starting it, it was brought up fine, I can access http://host_name:port_num and see tomcat hello page. But when I try to open manager app to see my deployed apps, I get 403 access denied, I already add roles in tomcat user xml as following:
<role rolename="manager"/>
<role rolename="manager-gui"/>
<role rolename="admin"/>
<user username="user" password="password" roles="admin,manager,manager-gui"/>
The error messages I saw is:
By default the Host Manager is only accessible from a browser running on the same machine as Tomcat. If you wish to modify this restriction, you'll need to edit the Host Manager's context.xml file.
How should I change context.xml file and get access to manager app?
Best Answer
For Tomcat v8.5.4 and above, the file
<tomcat>/webapps/manager/META-INF/context.xml
has been adjusted:Change this file to comment the
Valve
:After that, refresh your browser (not need to restart Tomcat), you can see the manager page.