Apache Tomcat


Image is setup to start tomcat automatically when Instance starts.

To change startup settings use 

sudo systemctl enable tomcat9


sudo systemctl disable tomcat9


Test Tomcat Server

When Tomcat starts running, you can test the program in a web browser or by using curl. Using the system’s loopback address, you can connect to the Tomcat server by specifying the port with the address in the URL search bar, as follows:

using browser visit the page

Tomcat is up and running if you see this page, “it works!”.

Create User

You should create a user for the Web Application Manager in the Tomcat Server. A new user account must be set up to use the Apache Tomcat Web Application Manager.

Open the tomcat-users.xml file in the Tomcat directory with your favorite text editor.

sudo nano /etc/tomcat9/tomcat-users.xml


Add Tagged Lines

When the file is opened, add these three tagged lines in the file above the “<” tag. Here, new user with the name “tomcat” has been created with a password set as “pass.” Add your own values as substitution for the username and password.

<role rolename=“admin-gui”/>
<role rolename=“manager-gui”/>
<user username=“tomcat” password=“pass”roles=“admin-gui,manager-gui”/>


Save the file and close it. Now, we can move on to accessing the manager application area.


Restart Tomcat

Restart the Tomcat Server with the following command.

sudo systemctl restart tomcat9


Access Tomcat Application Manager

In order to access the Tomcat server web application manager, enter the URL: into the web browser URL search bar and press enter. Next, enter the credentials that you gave to the new user in Tomcat Server. You should now see the Web Application Manager Window.


Tomcat Logs

Tomcat Server logs are located under /var/log/tomcat9.


For additional paid support, please send an email to aws-support@eebes.com