0
votes

I'm clearly missing something blindingly obvious here. Nothing I've done is working when it should be doing.

I've a blank EC2 instance on AWS. Downloaded Apache Tomcat8, unzipped the package. Open the browser and can successfully see the standard 'Tomcat installation successful page'. So far so good.

Now I'm trying to do two things; 1) Access the pages, Server Status, Manager App, and Host Manager.

Which according to various guides, I need to comment out the data within /webapps/manager/META-INF/context.xml (403 Access Denied on Tomcat 8 Manager App without prompting for user/password)

And then add a new user with the 4x permissions for manager-gui, manager-status, manager-script, manager-jmx, within the file /conf/tomcat-users-xml (http://tomcat.apache.org/tomcat-8.0-doc/manager-howto.html#Configuring_Manager_Application_Access)

I've done both of these (then shutdown and started Tomcat to make sure the settings take effect), and I still cannot access these pages. I'm getting the error message;

403 Access Denied

Which then tells me to configure the /conf/tomcat-users.xml file accordingly. Odd.

Here's the details of what is in this file;

<tomcat-users>
<role rolename="admin"/>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<role rolename="admin-gui"/>
<role rolename="admin-script"/>

<user usename="admin" password="admin" roles="admin,manager-gui,manager-script,manager-jmx,manager-status,admin-gui,admin-script"/>
</tomcat-users>

That is the first error. The second error is when I come around uploading the MyApplication.war file into the main /webapps folder. This then unpackages the app correctly into the folder for /MyApplication.

Next, I've tried every configuration I can think of within the /conf/server.xml file for the part and nothing is making Tomcat point to the /MyApplication folder so that this folder runs on www.website.com/ (at root, no directory).

Either AWS EC2 is doing something crazy in the background, or I've missed something blindingly obvious here to configure this.

1
The missing = is just a typo in this question, right? In the roles"admin part.Kayaman
which server you use it IIS or apache??Raja Ramachandran
@Kayaman Yes, just a typo. Good spot.Michael Cropper
@RajaRamachandran ApacheMichael Cropper
Are you open firewall port 8080 and 80?Raja Ramachandran

1 Answers

0
votes

In a nutshell... Previously I installed using wget and unpackaged the .tar.gz file. This, for some reason, behaves differently than when using the yum package manager to install Tomcat. So I installed via yum instead, updated the tomcat-users.xml file to allow access to the admin gui, updated the Manager and Hosts-Manger context.xml files to allow access to the guis from external location, did a restart on Tomcat for good luck. This still didn't work until I noticed that AWS EC2 installs Java 7 by default not Java 8, so I had to update to Java 8 then re-uploaded the .war file which then worked perfectly.