Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon
Labs

Change Tomcat for External Access

Welcome to this hands-on lab for Changing Apache Tomcat, a Java-based application platform built around deploying and managing Java Web Applications, so that it's accessible via the internet. The provided server runs Red Hat Enterprise 8 and has Tomcat 9 pre-installed for you, available on port **8080** at the server's public IP address. Once you have completed the task you will need to test, to ensure you get prompted for a username and password in the Tomcat interface.

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Intermediate
Duration
Clock icon 30m
Published
Clock icon May 08, 2020

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Test to Ensure You Can Access the Preconfigured Tomcat Instance by Using the Server's Public IP Address and Port 8080

    It may take from 3 to 10 minutes after the hands-on lab has started before you can access the Tomcat server on Port 8080.

    To access the server, use its external IP address (found on the hands-on lab overview page) in the URL bar of a web browser, then append :8080 to it.

    For example, if the server's external IP address was 3.92.152.3, then you would put the following into your web browser:

    http://3.92.152.3:8080

    Test to ensure you are unable to access the Host Manager App on the Tomcat GUI.

  2. Challenge

    Log into the Server and Change the Configuration File to Allow Internet Access to the Host Manager App via the GUI

    Note: Tomcat is installed under /usr/local/tomcat9.

    You will log into the server's console (not the web GUI) and make the changes required for opening up the access.

    The file you need to edit is /usr/local/tomcat9/webapps/host-manager/META-INF/context.xml.

    Find the line with this item:

    allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />
    

    Replace it with the following:

    allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1|.*" />
    

    Save the file and exit.

  3. Challenge

    Connect to the Tomcat GUI

    With a web browser, connect to your server on port 8080. If your server IP address was 3.93.186.99, then you would use the following (note that your IP Address will likely be different):

    http://3.93.186.99:8080

    You should now see the Tomcat GUI.

  4. Challenge

    Check That You Are Prompted for a Password

    Go to the Host Manager App. You should be prompted for a password. If you get a password prompt, then the hands-on lab is a success.

    If you get a 403 Access Denied error, then you were not successful. Please troubleshoot to find the problem.

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans