Apache Tomcat (Tomcat Manager)

Boa Tarde Galera, é primeira vez que estou instalando o Apache Tomcat, e aparentemente instalou normalmente, coloquei um usuário e senha, mas ele não deixa eu acessar o Tomcat Manager, me retorna este erro

403 Access Denied

You are not authorized to view this page.

If you have already configured the Manager application to allow access and you have used your browsers back button, used a saved book-mark or similar then you may have triggered the cross-site request forgery (CSRF) protection that has been enabled for the HTML interface of the Manager application. You will need to reset this protection by returning to the main Manager page. Once you return to this page, you will be able to continue using the Manager appliction's HTML interface normally. If you continue to see this access denied message, check that you have the necessary permissions to access this application.

If you have not changed any configuration files, please examine the file conf/tomcat-users.xml in your installation. That file must contain the credentials to let you use this webapp.

For example, to add the manager-gui role to a user named tomcat with a password of s3cret, add the following to the config file listed above.

<role rolename="manager-gui"/>
<user username="tomcat" password="s3cret" roles="manager-gui"/>
Note that for Tomcat 7 onwards, the roles required to use the manager application were changed from the single manager role to the following four roles. You will need to assign the role(s) required for the functionality you wish to access.

manager-gui - allows access to the HTML GUI and the status pages
manager-script - allows access to the text interface and the status pages
manager-jmx - allows access to the JMX proxy and the status pages
manager-status - allows access to the status pages only
For more information - please see the Manager App HOW-TO.

A impressão que dá, é que o usuário ou senha está errado, eu até instalei novamente para certificar que o erro não era na senha! mas o erro continua! :frowning:

Segue meu tomcat-users.xml

<?xml version="1.0" encoding="UTF-8"?>
<tomcat-users>
  <role rolename="manager"/>
  <role rolename="admin"/>
  <user username="admin" password="admin" roles="manager,admin"/>
</tomcat-users>

Cole essas linhas no seu tomcat-users.xml

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

Reinicie o Tomcat e deverá funcionar.

[quote=raf4ever]Cole essas linhas no seu tomcat-users.xml

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

Reinicie o Tomcat e deverá funcionar.[/quote]

:stuck_out_tongue: obrigado Pessoal, o que solucionou foi a dica do raf4ever,
minha pergunta agora é: Toda vez que eu instalar vai dar esse problema?

Olá alansystem,

Todas as vezes que eu instalo o tomcat apenas modifico a penúltima linha para:

e pronto já funciona legal.

* mais eu sempre modifico para todas as instalações que faço.*

Abraço.

[quote=renatommjr]Olá alansystem,

Todas as vezes que eu instalo o tomcat apenas modifico a penúltima linha para:

e pronto já funciona legal.

* mais eu sempre modifico para todas as instalações que faço.*

Abraço.[/quote]

Cara só funcionou com tua dica, obrigado.

[quote=renatommjr]Olá alansystem,

Todas as vezes que eu instalo o tomcat apenas modifico a penúltima linha para:

<user password=“s3cr3t” roles="[color=red]manager-gui, manager-script, manager-jmx, manager-status, admin[/color]" username=“root”/>

e pronto já funciona legal.

* mais eu sempre modifico para todas as instalações que faço.*

Abraço.[/quote]

Funcionou com a dica do renatommjr