How to setup Apache Tomcat on Windows in Azure/AWS/GCP

To install Tomcat in any of the cloud platforms, the best way is to use the available images in the marketplace that run Apache Tomcat on Windows server with the recommended configuration and the Java JDK. Production ready. Click on the links below to deploy to your preferred cloud platform.

Apache Tomcat Windows

Table of Contents

Apache Tomcat Windows Server Features

Apache Tomcat or Tomcat Server is a  Java Server Page container that assist web developers building and maintaining dynamic websites and applications based on the Java software platform.

 

  • Java Servlets container  of the Java platform are:  JavaServer Pages (JSP), Java Expression Language (Java EL) and WebSocket.
  • The software enables a web server to handle dynamic Java-based web content using the HTTP protocol.
  • It can handle both static pages and dynamic pages. The static pages are generated using HTML.
  • Essentially a web server  designed to serve files from the local system, like Apache.
  • A Java enterprise application server is a full-blown implementation of the Java EE (now Jakarta EE)  specification.

Getting Started with Apache Tomcat Windows

RDP (Remote Desktop Protocol) into new server

Once you have deployed Tomcat on Windows server, the first step is to RDP into the new instance once it has fully booted up.  The following links explain how to connect the VM once it has finished being deployed:

 

 

Once logged in, you’re now ready to start setting up your new server as per the following sections. 

Using Tomcat on Windows

The Tomcat installation is in the following directory:

 

c:\tomcat

 

The Tomcat management web URL is

 

http://localhost:8080

 

You will need to update the login user by updating the following file:

 

C:\tomcat\apache-tomcat-(version)\conf\tomcat-users.xml

 

Before making any changes stop the Apache Tomcat service, from services in Administration tools

 

Towards the bottom of this file remove the quotation comments as highlighted in the following screenshot

Next update the roles and username with the following as per the following screenshot below:

In the example above i’ve used the username ‘admin’ and password ‘admin’ but you can create any username you like.

 

Make sure to leave </tomcat-users> as the last section as in the screenshot above.

 

After the changes have been made you can now start the Apache Tomcat service again.

Tomcat Firewall Ports

Tomcat listens on port 8080 for HTTP, port 8443 for https and port 8009 for AJP

 

If you are using any firewalls, network security groups on any of the cloud platforms you will need to open these ports.

 

To setup AWS firewall rules refer to – AWS Security Groups

To setup Azure firewall rules refer to – Azure Network Security Groups

To setup Google GCP firewall rules refer to – Creating GCP Firewalls

Tomcat Documentation

Documentation on using Apache Tomcat on Windows can be found on their website :

 

https://tomcat.apache.org/tomcat-9.0-doc/index.html

Tomcat Support

Any issues with installing this solution into any of the cloud platforms, please leave a message below or contact us directly

 

For any Tomcat support, take a look at the support section on their website:

https://tomcat.apache.org/findhelp.html

 

Disclaimer: Apache Tomcat® is a registered trademark of Apache Software Foundation and is licensed under Apache License version 2. No warrantee of any kind, express or implied, is included with this software. Use at your risk, responsibility for damages (if any) to anyone resulting from the use of this software rest entirely with the user. The author is not responsible for any damage that its use could cause.

Avatar for Andrew Fitzgerald
Andrew Fitzgerald

Cloud Solution Architect. Helping customers transform their business to the cloud. 20 years experience working in complex infrastructure environments and a Microsoft Certified Solutions Expert on everything Cloud.

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x