Skip to main content

Change Apache Tomcat port 8080 to 80 or another port number

Change Apache Tomcat port 8080 to 80 or another port number. Whether it is Apache Tomcat 5 or Tomcat 6, by default Apache Tomcat runs on port 8080. But there can be situations where there are some other servers running on this same port forcing you to change the port of one of the servers. This article explains how to change this port 8080 on Tomcat (we tested this against Apache Tomcat 5.5 and 6.0 versions).

Here we’ll be using label <CATALINA_HOME> to denote the folder where Tomcat is installed. In our systems, tomcat is installed in the following path.

We need to edit the file named server.xml inside <CATALINA_HOME>\conf folder.

In the server.xml file; locate the following segment.

<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector port="8080" … />
By changing this 8080 value of port attribute, server would start listening on new port number.
<Connector port="8081" … />
After saving the changed server.xml file, Tomcat server must be restarted (stop then start) to activate the change.

Related Articles


  1. very long article!

  2. dear almas, if u say this is a long article then u might haven't seen long articles. this one is short n sweat....

  3. )) if you need setup 443 port it is more difficult + skype or other programms can block this port.

  4. Thank you very much...............

  5. i use another apache xampp by using default port which is 8080 then on the same time i also use apache tomcat with same port 8080. then when i run the apache tomcat, the server kill himself suddently. I already change the port to 8081 but the problem is still same. Please help me because I want to use apache xampp and tomcat at the same time.

  6. // xampp and tomcat ports conflict

    You may already know that you can not run two different applications on the same port. So you must change one of the ports other than 8080. So I guess you can easily change the Tomcat port 8080 to 8081 as explained above, and (re)start your Tomcat server. This will resolve your issue.

    Before starting xampp first check whether you have correctly changed the Tomcat port to 8081 using;

  7. Hi, I have changed port and applications is working fine on 80 port. But when I try to reach website with localhost it still redirects me to localhost:8080/app, and if I want to see my website I must write localhost/app.

    Maybe you know how to fix this? Thanks in advance!

  8. Hello, i need to change the tomcat port number in Sandbox{test Server]from 8080 to 80 .. it accepts all port number(Ex 8045) but not 80. pls Help me........

  9. thanx a lot...

  10. thank you soooo much

  11. thanks a lot this was really helpful

  12. I can't change the port no to any no.This is because when i save it says access denied. It says i dun have the right to change...Why is this happen???

  13. hi dear,
    thanks for give the information.....
    my tomcat not working in one day.after change the port id its working fine...
    thanks a lot.


  14. hi dear,
    this more helpful.bcoz i loss oneday to solve the error in tomcat.i change port id,now working fine.
    thanks a lot...


  15. @23
    Seems you only have read only access to the file you are trying to modify. You can try to get help from your sysadmin and ask for access.

  16. @25
    It's nice to hear that this helped you; thanks for the encouragement.

    I would like to request you to subscribe to our email updates or via fb (


Post a Comment

We appreciate your opinions, suggestions and criticism.

Popular posts from this blog

Web Services with Apache Axis 1.4 Tutorial: server and client sides

Java Sorting: Comparator vs Comparable Tutorial

Creative Commons License Digizol by Kamal Mettananda is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 License .
URL of this page must be supplied in attribution
© 2004-2017