06 - Tomcat Running Notes
06 - Tomcat Running Notes
WebServers
===========
=> Users can access our web application by sending request to server
=> We have several servers in the market to run our web applications
a) Tomcat
b) JBoss
c) Glasfish
d) Weblogic
e) WebSphere
==============
Tomcat Server
=============
=> Tomcat server runs on 8080 port number (we can change it)
================================
Tomcat Server folder structure
================================
bin: It contains files to start & stop server (windows : bat , Linux : sh)
temp : Temporary files will be created here (We can delete them)
=============
Tomcat Setup
=============
URL : https://tomcat.apache.org/download-90.cgi
$ wget <url>
=> Go inside tomcat server bin directory and execute below command
$ sh startup.sh
=> Enable tomcat server port in security group inbound rules (8080)
URL : http://ec2-public-ip:8080/war-file-name
==================================
*Lab Task To Peform On Linux VM*
==================================
3) Copy war file into tomcat server webapps folder from target
============================
Tomcat Admin Console Access
==============================
=> By default the Host Manager is only accessible from a browser running on the
same machine as Tomcat. If you wish to modify this restriction, you'll need to edit
the Host Manager's context.xml file.
=> In Manager context.xml file, change <Valve> section like below (allow attribute
value changed)
============================================================================
Add tomact users in "<tomact-folder>/conf/tomact-users.xml" file like below
============================================================================
================================================================================
We can change tomcat server default port in tomact/conf/server.xml file
================================================================================
-> When we change tomact port number in server.xml file then we have to enable that
port in Security Group which is associated with our EC2 instance.