Tomcat Web Application Manager

Question: Receive “403 Access Denied” when attempting to deploy the OpenMRS.WAR file from the Tomcat Web Application Manager.

Ubuntu (Linux): 20.04 Java (openjdk): 1.8.0_282 Apache Tomcat: 9.0.31 MySQL-Server: 8.0.23

tomcat-users.xml roles and users:

Using Chrome, Opened the Tomcat Web Application Manager

From “file to deploy” selected OpenMRS.war (Zip) downloaded from the OpenMRS.ORG (Platform 2.4.0 WAR for Enterprise)

Selected Deploy and immediately received a: “403 Access Denied” (See below)

The error message mentions editing the Manager’s context.xml file. Could not find what editing is required for this file. Much of what I found from Googling the error pertains to older versions of Apache Tomcat. I added the manager roles to the tomcat-users.xml files as recommended from the error message. Looking for a resolution to get past the “403 Access Denied” error.

Thank you

403 Access Denied You are not authorized to view this page. By default the 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 Manager’s context.xml file.

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

can you try to add these line to your tomcat-users.xml and re start the server ie check this link <role rolename="manager-gui"/><user username="your username" password="your - dont forget to add the username and password to your desired ones!

Hello Herbert,

I had manager-gui as one of the roles and users in the tomcat-users.xml file. I created a user line with only the manager-gui and still received the 403 Access Denied error.

I am open to other ideas.

Thank you William

Why not just directly copy the war file to the tomcat webapps folder?

@william and after re-start your tomcat