Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix Tomcat HTTP Status 403: Access to the requested resource has been denied?

I am trying to setup Tomcat with my current source code. I downloaded the zip from tomcat site (6.0.32).

I then put in the config file for my project in tomcatDir\conf\Catalina\localhost

I then added the users to tomcat-users.xml

When I hit my application using localhost:8080/<context root>, I get the login prompt as I am supposed to. After providing the right credentials, the tomcat throws 403 error. I am able to access the manager with localhost:8080/manager/

tomcat-users.xml:

<role rolename="manager"/>
<role rolename="admin"/>
<user username="admin" password="5c50nD" roles="admin,manager"/>
<user username="nih\kishorev" password="altum" roles="admin,manager"/>
like image 386
Viidhya Avatar asked Apr 27 '11 17:04

Viidhya


1 Answers

You should choose manager roles which are defined by tomcat instead of admin or manager.

manager-gui - Allows access to the html interface
manager-script - Allows access to the plain text interface
manager-jmx - Allows access to the JMX proxy interface
manager-status - Allows access to the read-only status pages

link to Configuring Manager Application access in tomcat

like image 172
Qinjin Avatar answered Oct 10 '22 17:10

Qinjin