How to change Tomcat port on Ubuntu 14.04?

Posted on 2014-08-19
Last Modified: 2014-08-19

I've just followed this tutorial to install Tomcat 7 on my Ubuntu 14.04.
The only problem is that I already have ISPConfig working on port 8080
and tomcat's default installation also uses the same port.
How do I change the tomcat port? I'd like to use port 9000.

Question by:badwolfff
    LVL 7

    Accepted Solution

    LVL 3

    Expert Comment

    by:Aman Subhan
    In your tomcat install directory, go into conf dir, open server.xml and find the connector declaration. there you will find the port argument... Change it any port you like! Just us said 9000, here it will look like this

    <Connector port="9000" protocol="HTTP/1.1" 
                   redirectPort="8443" />

    Open in new window


    Author Comment


    thanks for the link and code. They are exactly the same, if I am not mistaken, right?

    Anyway I knew that and already did it before your comments but even then it doesn't work and I get:
    The connection has timed out
    The server is taking too long to respond.

    Anyone has any other ideas?

    thanks in advance

    Author Comment

    By the way I set the port to 9000 and also opened it on iPtables and UFW, still no love or luck :(

    Author Comment

    All sorted after the reboot :)

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
    SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
    The viewer will learn how to implement Singleton Design Pattern in Java.
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now