Tuesday, 15 January 2019

How to change apache tomcat port number

              In this post, we will see how to change Apache Tomcat port number.
              Apache tomcat is a web server. By default, it has port number 8080. There can be a conflict, if the other application with same port number (e.g. Oracle) is running simultaneously. In this situation, we need to change port number of Apache Tomcat.


               Follow the following procedure to change port number of Apache Tomcat.

1. Open terminal.

2. Go to folder /opt/tomcat/conf .

3. Open file server.xml by using any text editor (e.g. gedit).

4. Replace existing port number (e.g. 8080) by another port number (e.g. 8081).

5. Save file and exit.

6. Shut down the tomcat server if it is already started. (To do this, go to /opt/tomcat/bin folder. Type ./shutdown.sh and press Enter).

7.Start the tomcat server.
(To do this, go to /opt/tomcat/bin folder. Type ./startup.sh and press Enter).

8. Now, open browser and type url with new port number. e.g. localhost:8081 and press Enter.

9. Tomcat will get started with new port number.



 
 

No comments:

Post a comment