Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Web Servers»Tomcat»How to Change Tomcat default Port

    How to Change Tomcat default Port

    RahulBy RahulJune 25, 20161 Min ReadUpdated:July 25, 2016

    Tomcat is most popular web server for hosting java based websites. If you want to install tomcat on your system use following tutorials. By default tomcat runs on port 8080. This tutorial will help you to change tomcat server default port.

    Change Tomcat Default Port

    Edit server.xml file located under conf directory of tomcat installation.

    $ vi [TOMCAT INSTALL DIR]/conf/server.xml
    

    Find the below content in configuration file

        <Connector port="8080" protocol="HTTP/1.1"
                   connectionTimeout="20000"
                   redirectPort="8443" />
    

    Replace port 8080 with your required port. For example we are changing the default tomcat port with 8081.

        <Connector port="8081" protocol="HTTP/1.1"
                   connectionTimeout="20000"
                   redirectPort="8443" />
    

    After making above changes restart tomcat service. You will see that now tomcat is started on port 8081 or port you configured. Access tomcat on new port in web browser.

    Change Tomcat default Port

    port tomcat
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow Global Connectivity Shapes Modern Entertainment
    Next Article How To Install Python 3.x on Windows

    Related Posts

    How to Scan Open Ports with Nmap

    5 Mins Read

    How to Change SSH Port in Linux

    Updated:April 22, 20222 Mins Read

    How to Install Tomcat 10 on Debian 10

    Updated:February 18, 20225 Mins Read

    How To Secure Tomcat with Let’s Encrypt SSL

    Updated:June 4, 20223 Mins Read

    How to Install Tomcat 10 on Ubuntu 20.04

    Updated:February 18, 20226 Mins Read

    How to Set Up SSH Tunnel with PuTTY

    3 Mins Read

    1 Comment

    1. Ajay on July 17, 2020 9:07 am

      I have configured tomcat connector on one server and create different virtual host domain but I am facing some issue like I have created vms.dev.com:7070 domain and other is vms.test.com:9090 in tomcat server both domain is accessible in browser but when I open vms.dev.com:9090 it will also open and its directory location is test server and when I open vms.test.com:7070 it will also open and its directory location in dev server. it is possible to restrict port access on other domain in same server like if I want to open vms.dev.com:9090 then it should be give some error. Please help me to solve this issue.

      Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • What is the /etc/nsswitch.conf file in Linux
    • How to Install Ionic Framework on Ubuntu 22.04
    • What is the /etc/hosts file in Linux
    • How to Install Angular CLI on Ubuntu 22.04
    • How to Install Composer on Ubuntu 22.04
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.