Sunday, 20 March 2016

How to change the port of Tomcat ?


Example : Change port to 8090 instead of default port 8080.

Assuming you have no other server already running on port 8090.
Making this change lets you use URLs of the form http://localhost:80/blah instead of http://localhost:8080/blah.
Note that you need admin privileges to make this change on Unix / Linux.

Note: Some versions of Windows XP automatically start IIS on port 80.
So, if you use XP and want to use port 80 for Tomcat, you may need to disable IIS (see the AdministrativeTools section of the Control Panel).


Changing port

To change the port, edit install_dir/ conf/ server.xml and change the port attribute of the Connector element from 8080 to 8090, yielding a result similar to that below.

Example
<Connector className="org.apache.catalina.connector.http.HttpConnector" port="8090" minProcessors="5" maxProcessors="75" enableLookups="true" redirectPort="8443" acceptCount="10" debug="0" connectionTimeout="60000"/>

  -------
</Connector>

No comments:

Post a Comment

Note: only a member of this blog may post a comment.