Friday, 29 July 2022

How to change tomcat port?

Apache tomcat runs on port 8080 by default.

 

How to customize the tomcat port?

By updating ‘<TOMCAT_HOME>/conf/server.xml’ file, we can customize the tomcat server port.

 

Open <TOMCAT_HOME>/conf/server.xml file in any editor, search for 8080, you will find below configuration.

<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />

 


Set the port number of your choice and save the changes. For example, I set the port number to 9090.

 

<Connector port="9090" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />

Stop and start the tomcat server. Once the server started, open the url ‘http://localhost:9090/’ in browser, you will see tomcat home page.




Previous                                                 Next                                                 Home

No comments:

Post a Comment