MilesWeb
MilesWeb Hosting Forum

Please login or register.

Login with username, password and session length

 

News:

SMF - Just Installed!


Author Topic: How to change Tomcat server default port?  (Read 3486 times)

0 Members and 1 Guest are viewing this topic.

Offline Dipak Bhoi

  • MilesWeb Team Member
  • Full Member
  • ***
  • Posts: 208
  • Karma: +5/-0
    • View Profile
    • MilesWeb Internet Services
How to change Tomcat server default port?
« on: June 01, 2015, 05:25:12 PM »
Hello folks,

Tomcat default port is 8080 but sometimes for some java applications need other port like 8081 or 8082. In this tomcat tutorial we will see how to change default port 8080.

Login to the server using root user's credentials and locate file server.xml configuration file

Quote
#locate server.xml

/usr/local/easy/etc/easy-tomcat7/server.xml

Now open this file and edit as below.

Before:
Quote
<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="30000"
               redirectPort="8443" />

After:
 
Quote
<Connector port="8081" protocol="HTTP/1.1"
               connectionTimeout="30000"
               redirectPort="8443" />

save the file server.xml file and restart tomcat service . It will start listening on port 8081 instead on default port 8080.

Access URL http://xxx.xxx.xxx.xx:8081 (xxx.xxx.xxx.xx should be your server's IP address)

That's all, enjoy !!! :) ;) :)








MilesWeb.com
cPanel Hosting in India - cPanel Hosting in India.

Grab an SSL for your website and SAVE 20% now. Coupon Code SSLSAVE20.

MilesWeb Hosting Forum

How to change Tomcat server default port?
« on: June 01, 2015, 05:25:12 PM »