How to change the port of Tomcat from 8080 to 80?
I want to execute my web app as http://localhost.
1) Go to conf folder in tomcat installation directory
e.g. C:\Tomcat 6.0\conf\
2) Edit following tag in server.xml file
<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
3) Change the port=8080 value to port=80
4) Save file.
5) Stop your Tomcat and restart it.
On Ubuntu and Debian systems, there are several steps needed:
- In server.xml, change the line
<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>to haveport="80". - Install the recommended (not required) authbind package, with a command like:
sudo apt-get install authbind - Enable authbind in the server.xml file (in either
/etc/tomcat6or/etc/tomcat7) by uncommenting and setting the line like:AUTHBIND=yes
All three steps are needed.