# Application / Web Server

# Application Server / Web server

1. Apache-Tomcat
    
2. Jboss
    
3. Nginx
    
4. Glass-fish...etc
    

# Setup

1. Download apache tomcat software and Extract it.
    
    * [https://tomcat.apache.org/download-10.cgi](https://tomcat.apache.org/download-10.cgi)
        
    * wget [https://dlcdn.apache.org/tomcat/tomcat-10/v10.0.27/bin/apache-tomcat-10.0.27.tar.gz](https://dlcdn.apache.org/tomcat/tomcat-10/v10.0.27/bin/apache-tomcat-10.0.27.tar.gz)
        
    * tar -xvzf apache-tomcat-10.0.27.tar.gz
        
2. change port number in
    
    * vi /apache-tomcat-10.0.27/conf/server.xml
        
        Note:- Jenkins also running on 8080 port by default. we can't run multiple applications on single port.
        
3. Create an account in tomcat under manager app
    
    * vi /apache-tomcat-10.0.27/conf/tomcat-users.xml
        

Note:- Please change the allow attribute value in the context.xml file, present in webapps/manager/META-INF folder. Old configuration change to new Configuration

This will allow access to manager remotely from all IP addresses for login. Further you won't get 403 access denied page

4. start apache-tomcat
    
    * go to cd /apache-tomcat-10.0.27/bin/
        
    * ./[startup.sh](http://startup.sh) (or) bash [startup.sh](http://startup.sh)
        
    * ./[shutdown.sh](http://shutdown.sh)
        
5. Verify tomcat by giving [http://3.91.178.105:80](http://3.91.178.105:80) in the browser.
    

# Tomcat Integration With Jenkins

1. Install Jenkins in ec2-instance
    
2. Install Deploy to container plugin
    
3. Create a deploy job and configure in post-build actions
    

WAR/EAR files: \*\*/\*.war Context path: sample.war Containers: Tomcat 9.x Remote Tomcat URL: [http://3.91.178.105:8181](http://3.91.178.105:8181)
