Changing the Port on tomcat
Server - Ubuntu

Tomcat

The default port for tomcat is 8080 because developers are assuming you may have a apache server set up on port 80.  There are two issues with changing the port to 80. First, any ports under 1024 can only be managed by root which means that tomcat will need to run as root.  If you consider this too big of a security risk then you will either need to figure a way to run on port 80 as a unprivileged user or stay at port 8080.  The second issue is the conflict that you may have with apache.  If you are not running an apache server then it should not be an issue at all.  Just keep in mind you cannot bind two daemons to the same port at the same time.

 

Make sure that apache2 is turned off if it is installed to avoid conflict on port 80.


sudo service apache2 stop

Check that there are not services listening on port 80.

netstat -aunt | grep 80

Here is the basic configuration changes that need to be made in /usr/share/tomcat7/confserver.xml  to move from port 8080 to 80.


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

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


Be sure to stop tomcat and then start tomcat and then test.