How do I change the default port of Tomcat?

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.

Stop tomcat server if it is already running.

Open <Tomcat_Home>/conf/server.xml file for editing.

Look for port *8080* in the xml file and replace with any available port.
<Connector port=”8080″ protocol=”HTTP/1.1″ 
connectionTimeout=”20000″ 
redirectPort=”8443″ />

This image has an empty alt attribute; its file name is 08-Feb-21-03-36-09-PM-1024x425.png

If there is other tomcat running on the same server, you have to change SHUTDOWN port as well.
<Server port=”8005″ shutdown=”SHUTDOWN”>

Start tomcat server.

This image has an empty alt attribute; its file name is Untitled.png
Click to rate this post!
[Total: 2 Average: 5]

Share and Enjoy !

Shares
Shares