Change Apache Tomcat port 8080 to 80 or another port number - Digizol6

Post Top Ad

Responsive Ads Here

Post Top Ad

Responsive Ads Here

Tuesday, June 17, 2008

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.
<CATALINA_HOME>=C:\Java\Tomcat_x.x

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

24 comments:

  1. very long article!

    ReplyDelete
  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....

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

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

    ReplyDelete
  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.

    ReplyDelete
  6. 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!

    ReplyDelete
  7. 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........

    ReplyDelete
  8. thank you soooo much

    ReplyDelete
  9. thanks a lot this was really helpful

    ReplyDelete
  10. 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???

    ReplyDelete
  11. 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.

    parthimahesh

    ReplyDelete
  12. 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...

    parthi

    ReplyDelete
  13. @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.

    ReplyDelete

Post Top Ad

Responsive Ads Here