How to change Tomcat port in Linux

Home > Search > How-to
  by

Shutdown Tomcat.

~]# $tomcat_home/bin/shutdown.sh
. . .
Tomcat stopped.

 

In the $tomcat_home/conf/server.xml file, change the port from 8080 to you preferred port. In this example, the port is changed to 12345.

<Connector port="12345" protocol="HTTP/1.1"
. . .

 

Startup Tomcat.

~]# $tomcat_home/bin/startup.sh
. . .
Tomcat started.

 

Tomcat can now be accessed using the new port.



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments