I tried installing tomcat server on an EC2 instance. After doing the setup, it got successfully installed and it got started. Please check below logs for it:
ubuntu@ip-XXX-XX-X-XXX:~/apache-tomcat-8.5.43/bin$ /home/ubuntu/apache-
tomcat-8.5.43/bin/startup.sh
Using CATALINA_BASE: /home/ubuntu/apache-tomcat-8.5.43
Using CATALINA_HOME: /home/ubuntu/apache-tomcat-8.5.43
Using CATALINA_TMPDIR: /home/ubuntu/apache-tomcat-8.5.43/temp
Using JRE_HOME: /usr/bin/java
Using CLASSPATH: /home/ubuntu/apache-tomcat-
8.5.43/bin/bootstrap.jar:/home/ubuntu/apache-tomcat-8.5.43/bin/tomcat-
juli.jar
Tomcat started.
I tried taking the public DNS IP and tried hitting http://:9090 to check for the GUI but it does not loads up. I have changed the default port for tomcat to 9090 in the server.xml file. It works for me on the local but I need it to work it on EC2 instance.
can anyone assist me on this ?
For cloud architecture, it is best practice to implement principles of least privilege. Meaning, always only allow what is needed.
AWS Security groups are virtual firewalls, that control inbound and outbound traffic for EC2 instances.
To allow port 9090 into your EC2 instance: