Tomcat – Cannot access tomcat’s manager webapp

tomcat

This question has been asked at least 5 times here or at stackoverflow, but in virtually all cases either a pre tomcat7 version causes trouble or the tomcat-users.xml is syntactically incorrect. I'd appreciate it if you help me find my errors.

I'm running tomcat 7.0.52-1 with openjdk 7 on Ubuntu 14.04 LTS.

My users config file is here.

Yet when I visit

http://localhost:8080 

and click "Manager App", I get an Error 401.
Any ideas?

PS I edited my tomcat-users.xml . I added

<role rolename="admin-gui"/>

and I also changed my

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

to

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

Best Answer

if you use apt-get to install tomcat, you must add manager with the following command:

sudo apt-get install tomcat7-admin

Then can access the manager in http://your_ip_address:8080/manager/html

see also: How To Install Apache Tomcat 7 on Ubuntu 14.04 via Apt-Get